Top Description Fields Constructors Methods
org.springframework.beans.factory.config

public Class NamedBeanHolder<T>

extends Object
implements NamedBean
Class Inheritance
All Implemented Interfaces
org.springframework.beans.factory.NamedBean
Type Parameters
<T>
the bean type
Imports
org.springframework.beans.factory.NamedBean, org.springframework.util.Assert

A simple holder for a given bean name plus bean instance.
Author
Juergen Hoeller
Since
4.3.3
See Also
AutowireCapableBeanFactory#resolveNamedBean(Class)

Field Summary

Modifier and TypeField and Description
private final T
private final String

Constructor Summary

AccessConstructor and Description
public
NamedBeanHolder(String
the name of the bean
beanName
,
T
the corresponding bean instance
beanInstance
)

Create a new holder for the given bean name plus instance.

Method Summary

Modifier and TypeMethod and Description
public T
getBeanInstance()

Return the corresponding bean instance.

public String
getBeanName()

Implements org.springframework.beans.factory.NamedBean.getBeanName.

Return the name of the bean.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

beanInstanceback to summary
private final T beanInstance
beanNameback to summary
private final String beanName

Constructor Detail

NamedBeanHolderback to summary
public NamedBeanHolder(String beanName, T beanInstance)

Create a new holder for the given bean name plus instance.

Parameters
beanName:String

the name of the bean

beanInstance:T

the corresponding bean instance

Method Detail

getBeanInstanceback to summary
public T getBeanInstance()

Return the corresponding bean instance.

getBeanNameback to summary
public String getBeanName()

Implements org.springframework.beans.factory.NamedBean.getBeanName.

Return the name of the bean.

Annotations
@Override