Class NamedBeanHolder<T>
- java.lang.Object
- org.springframework.beans.factory.config.NamedBeanHolder<T>
- All Implemented Interfaces:
NamedBean
public class NamedBeanHolder<T> extends Object implements NamedBean
A simple holder for a given bean name plus bean instance.- Since:
- 4.3.3
- Author:
- Juergen Hoeller
- See Also:
AutowireCapableBeanFactory.resolveNamedBean(Class)
Constructor Summary
Constructors Constructor Description NamedBeanHolder(String beanName, T beanInstance)Create a new holder for the given bean name plus instance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetBeanInstance()Return the corresponding bean instance (can benull).StringgetBeanName()Return the name of the bean (nevernull).
Constructor Detail
NamedBeanHolder
public NamedBeanHolder(String beanName, T beanInstance)
Create a new holder for the given bean name plus instance.- Parameters:
beanName- the name of the beanbeanInstance- the corresponding bean instance
Method Detail
getBeanName
public String getBeanName()
Return the name of the bean (nevernull).- Specified by:
getBeanNamein interfaceNamedBean
getBeanInstance
public T getBeanInstance()
Return the corresponding bean instance (can benull).