Class BeanComponentDefinition
- All Implemented Interfaces:
BeanMetadataElement
,ComponentDefinition
- Since:
- 2.0
- Author:
- Rob Harrop, Juergen Hoeller
-
Constructor Summary
ConstructorDescriptionBeanComponentDefinition
(BeanDefinitionHolder beanDefinitionHolder) Create a new BeanComponentDefinition for the given bean.BeanComponentDefinition
(BeanDefinition beanDefinition, String beanName) Create a new BeanComponentDefinition for the given bean.BeanComponentDefinition
(BeanDefinition beanDefinition, String beanName, String[] aliases) Create a new BeanComponentDefinition for the given bean. -
Method Summary
Modifier and TypeMethodDescriptionboolean
This implementations expects the other object to be of type BeanComponentDefinition as well, in addition to the superclass's equality requirements.Return theBeanDefinitions
that were registered to form thisComponentDefinition
.Return the set ofBeanReferences
that are considered to be important to thisComponentDefinition
.Return a friendly description of the described component.Return theBeanDefinitions
that represent all relevant inner beans within this component.getName()
Get the user-visible name of thisComponentDefinition
.toString()
This implementation returns this ComponentDefinition's description.Methods inherited from class org.springframework.beans.factory.config.BeanDefinitionHolder
getAliases, getBeanDefinition, getBeanName, getLongDescription, getShortDescription, getSource, hashCode, matchesName
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.beans.BeanMetadataElement
getSource
-
Constructor Details
-
BeanComponentDefinition
Create a new BeanComponentDefinition for the given bean.- Parameters:
beanDefinition
- the BeanDefinitionbeanName
- the name of the bean
-
BeanComponentDefinition
public BeanComponentDefinition(BeanDefinition beanDefinition, String beanName, @Nullable String[] aliases) Create a new BeanComponentDefinition for the given bean.- Parameters:
beanDefinition
- the BeanDefinitionbeanName
- the name of the beanaliases
- alias names for the bean, ornull
if none
-
BeanComponentDefinition
Create a new BeanComponentDefinition for the given bean.- Parameters:
beanDefinitionHolder
- the BeanDefinitionHolder encapsulating the bean definition as well as the name of the bean
-
-
Method Details
-
getName
Description copied from interface:ComponentDefinition
Get the user-visible name of thisComponentDefinition
.This should link back directly to the corresponding configuration data for this component in a given context.
- Specified by:
getName
in interfaceComponentDefinition
-
getDescription
Description copied from interface:ComponentDefinition
Return a friendly description of the described component.Implementations are encouraged to return the same value from
toString()
.- Specified by:
getDescription
in interfaceComponentDefinition
-
getBeanDefinitions
Description copied from interface:ComponentDefinition
Return theBeanDefinitions
that were registered to form thisComponentDefinition
.It should be noted that a
ComponentDefinition
may well be related with otherBeanDefinitions
viareferences
, however these are not included as they may be not available immediately. ImportantBeanReferences
are available fromComponentDefinition.getBeanReferences()
.- Specified by:
getBeanDefinitions
in interfaceComponentDefinition
- Returns:
- the array of BeanDefinitions, or an empty array if none
-
getInnerBeanDefinitions
Description copied from interface:ComponentDefinition
Return theBeanDefinitions
that represent all relevant inner beans within this component.Other inner beans may exist within the associated
BeanDefinitions
, however these are not considered to be needed for validation or for user visualization.- Specified by:
getInnerBeanDefinitions
in interfaceComponentDefinition
- Returns:
- the array of BeanDefinitions, or an empty array if none
-
getBeanReferences
Description copied from interface:ComponentDefinition
Return the set ofBeanReferences
that are considered to be important to thisComponentDefinition
.Other
BeanReferences
may exist within the associatedBeanDefinitions
, however these are not considered to be needed for validation or for user visualization.- Specified by:
getBeanReferences
in interfaceComponentDefinition
- Returns:
- the array of BeanReferences, or an empty array if none
-
toString
This implementation returns this ComponentDefinition's description.- Overrides:
toString
in classBeanDefinitionHolder
- See Also:
-
equals
This implementations expects the other object to be of type BeanComponentDefinition as well, in addition to the superclass's equality requirements.- Overrides:
equals
in classBeanDefinitionHolder
-