|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.beans.factory.config.BeanDefinitionHolder
public class BeanDefinitionHolder
Holder for a BeanDefinition with name and aliases. Can be registered as a placeholder for an inner bean.
Can also be used for programmatic registration of inner bean definitions. If you don't care about BeanNameAware and the like, registering RootBeanDefinition or ChildBeanDefinition is good enough.
BeanNameAware
,
RootBeanDefinition
,
ChildBeanDefinition
Constructor Summary | |
---|---|
BeanDefinitionHolder(BeanDefinitionHolder beanDefinitionHolder)
Copy constructor: Create a new BeanDefinitionHolder with the same contents as the given BeanDefinitionHolder instance. |
|
BeanDefinitionHolder(BeanDefinition beanDefinition,
String beanName)
Create a new BeanDefinitionHolder. |
|
BeanDefinitionHolder(BeanDefinition beanDefinition,
String beanName,
String[] aliases)
Create a new BeanDefinitionHolder. |
Method Summary | |
---|---|
boolean |
equals(Object other)
|
String[] |
getAliases()
Return the alias names for the bean, as specified directly for the bean definition. |
BeanDefinition |
getBeanDefinition()
Return the wrapped BeanDefinition. |
String |
getBeanName()
Return the primary name of the bean, as specified for the bean definition. |
String |
getLongDescription()
Return a long description for the bean, including name and aliases as well as a description of the contained BeanDefinition . |
String |
getShortDescription()
Return a friendly, short description for the bean, stating name and aliases. |
Object |
getSource()
Expose the bean definition's source object. |
int |
hashCode()
|
boolean |
matchesName(String candidateName)
Determine whether the given candidate name matches the bean name or the aliases stored in this bean definition. |
String |
toString()
This implementation returns the long description. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BeanDefinitionHolder(BeanDefinition beanDefinition, String beanName)
beanDefinition
- the BeanDefinition to wrapbeanName
- the name of the bean, as specified for the bean definitionpublic BeanDefinitionHolder(BeanDefinition beanDefinition, String beanName, String[] aliases)
beanDefinition
- the BeanDefinition to wrapbeanName
- the name of the bean, as specified for the bean definitionaliases
- alias names for the bean, or null
if nonepublic BeanDefinitionHolder(BeanDefinitionHolder beanDefinitionHolder)
Note: The wrapped BeanDefinition reference is taken as-is;
it is not
deeply copied.
beanDefinitionHolder
- the BeanDefinitionHolder to copyMethod Detail |
---|
public BeanDefinition getBeanDefinition()
public String getBeanName()
public String[] getAliases()
null
if nonepublic Object getSource()
getSource
in interface BeanMetadataElement
BeanMetadataElement.getSource()
public boolean matchesName(String candidateName)
public String getShortDescription()
getBeanName()
,
getAliases()
public String getLongDescription()
BeanDefinition
.
getShortDescription()
,
getBeanDefinition()
public String toString()
toString
in class Object
getLongDescription()
,
getShortDescription()
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |