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.
org.springframework.beans.factory.BeanNameAware , org.springframework.beans.factory.support.RootBeanDefinition , org.springframework.beans.factory.support.ChildBeanDefinition
| Modifier and Type | Field and Description |
|---|---|
| private final String[] | |
| private final BeanDefinition | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | BeanDefinitionHolder(BeanDefinition
the BeanDefinition to wrap beanDefinition, String the name of the bean, as specified for the bean definition beanName)Create a new BeanDefinitionHolder. |
| public | BeanDefinitionHolder(BeanDefinition
the BeanDefinition to wrap beanDefinition, String the name of the bean, as specified for the bean definition beanName, String[] alias names for the bean, or aliases)null if noneCreate a new BeanDefinitionHolder. |
| public | BeanDefinitionHolder(BeanDefinitionHolder
the BeanDefinitionHolder to copy beanDefinitionHolder)Copy constructor: Create a new BeanDefinitionHolder with the same contents as the given BeanDefinitionHolder instance. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. Indicates whether some other object is "equal to" this one. |
| public String[] | Returns: the array of alias names, ornull if noneReturn the alias names for the bean, as specified directly for the bean definition. |
| public BeanDefinition | |
| public String | |
| public String | getLongDescription()
Return a long description for the bean, including name and aliases
as well as a description of the contained |
| public String | |
| public Object | getSource()
Overrides default org. Expose the bean definition's source object. |
| public int | |
| public boolean | matchesName(String candidateName)
Determine whether the given candidate name matches the bean name or the aliases stored in this bean definition. |
| public String |
| aliases | back to summary |
|---|---|
| private final String[] aliases
| |
| beanDefinition | back to summary |
|---|---|
| private final BeanDefinition beanDefinition | |
| beanName | back to summary |
|---|---|
| private final String beanName | |
| BeanDefinitionHolder | back to summary |
|---|---|
| public BeanDefinitionHolder(BeanDefinition beanDefinition, String beanName) Create a new BeanDefinitionHolder.
| |
| BeanDefinitionHolder | back to summary |
|---|---|
| public BeanDefinitionHolder(BeanDefinition beanDefinition, String beanName, String[] aliases) Create a new BeanDefinitionHolder.
| |
| BeanDefinitionHolder | back to summary |
|---|---|
| public BeanDefinitionHolder(BeanDefinitionHolder beanDefinitionHolder) Copy constructor: Create a new BeanDefinitionHolder with the same contents as the given BeanDefinitionHolder instance. Note The wrapped BeanDefinition reference is taken as-is;
it is
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getAliases | back to summary |
|---|---|
| public String[] getAliases() Return the alias names for the bean, as specified directly for the bean definition. | |
| getBeanDefinition | back to summary |
|---|---|
| public BeanDefinition getBeanDefinition() Return the wrapped BeanDefinition. | |
| getBeanName | back to summary |
|---|---|
| public String getBeanName() Return the primary name of the bean, as specified for the bean definition. | |
| getLongDescription | back to summary |
|---|---|
| public String getLongDescription() Return a long description for the bean, including name and aliases
as well as a description of the contained
| |
| getShortDescription | back to summary |
|---|---|
| public String getShortDescription() Return a friendly, short description for the bean, stating name and aliases.
| |
| getSource | back to summary |
|---|---|
| public Object getSource() Overrides default org. Expose the bean definition's source object.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| matchesName | back to summary |
|---|---|
| public boolean matchesName(String candidateName) Determine whether the given candidate name matches the bean name or the aliases stored in this bean definition. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. This implementation returns the long description. Can be overridden to return the short description or any kind of custom description instead.
| |