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

public Class BeanComponentDefinition

extends BeanDefinitionHolder
implements ComponentDefinition
Class Inheritance
All Implemented Interfaces
org.springframework.beans.factory.parsing.ComponentDefinition, org.springframework.beans.BeanMetadataElement
Imports
java.util.ArrayList, .List, org.springframework.beans.PropertyValue, .PropertyValues, org.springframework.beans.factory.config.BeanDefinition, .BeanDefinitionHolder, .BeanReference, org.springframework.lang.Nullable

ComponentDefinition based on a standard BeanDefinition, exposing the given bean definition as well as inner bean definitions and bean references for the given bean.
Authors
Rob Harrop, Juergen Hoeller
Since
2.0

Field Summary

Modifier and TypeField and Description
private final BeanReference[]
private final BeanDefinition[]

Constructor Summary

AccessConstructor and Description
public
BeanComponentDefinition(BeanDefinition
the BeanDefinition
beanDefinition
,
String
the name of the bean
beanName
)

Create a new BeanComponentDefinition for the given bean.

public
BeanComponentDefinition(BeanDefinition
the BeanDefinition
beanDefinition
,
String
the name of the bean
beanName
,
String[]
alias names for the bean, or null if none
aliases
)

Create a new BeanComponentDefinition for the given bean.

public
BeanComponentDefinition(BeanDefinitionHolder
the BeanDefinitionHolder encapsulating the bean definition as well as the name of the bean
beanDefinitionHolder
)

Create a new BeanComponentDefinition for the given bean.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
other
)

Overrides org.springframework.beans.factory.config.BeanDefinitionHolder.equals.

This implementation expects the other object to be of type BeanComponentDefinition as well, in addition to the superclass's equality requirements.

public BeanDefinition[]
getBeanDefinitions()

Implements org.springframework.beans.factory.parsing.ComponentDefinition.getBeanDefinitions.

Return the BeanDefinitions that were registered to form this ComponentDefinition.

public BeanReference[]
getBeanReferences()

Implements org.springframework.beans.factory.parsing.ComponentDefinition.getBeanReferences.

Return the set of BeanReferences that are considered to be important to this ComponentDefinition.

public String
getDescription()

Implements org.springframework.beans.factory.parsing.ComponentDefinition.getDescription.

Return a friendly description of the described component.

public BeanDefinition[]
getInnerBeanDefinitions()

Implements org.springframework.beans.factory.parsing.ComponentDefinition.getInnerBeanDefinitions.

Return the BeanDefinitions that represent all relevant inner beans within this component.

public String
getName()

Implements org.springframework.beans.factory.parsing.ComponentDefinition.getName.

Get the user-visible name of this ComponentDefinition.

public String
toString()

Overrides org.springframework.beans.factory.config.BeanDefinitionHolder.toString.

This implementation returns this ComponentDefinition's description.

Inherited from org.springframework.beans.factory.config.BeanDefinitionHolder:
getAliasesgetBeanDefinitiongetBeanNamegetLongDescriptiongetShortDescriptiongetSourcehashCodematchesName

Field Detail

beanReferencesback to summary
private final BeanReference[] beanReferences
innerBeanDefinitionsback to summary
private final BeanDefinition[] innerBeanDefinitions

Constructor Detail

BeanComponentDefinitionback to summary
public BeanComponentDefinition(BeanDefinition beanDefinition, String beanName)

Create a new BeanComponentDefinition for the given bean.

Parameters
beanDefinition:BeanDefinition

the BeanDefinition

beanName:String

the name of the bean

BeanComponentDefinitionback to summary
public BeanComponentDefinition(BeanDefinition beanDefinition, String beanName, String[] aliases)

Create a new BeanComponentDefinition for the given bean.

Parameters
beanDefinition:BeanDefinition

the BeanDefinition

beanName:String

the name of the bean

aliases:String[]

alias names for the bean, or null if none

BeanComponentDefinitionback to summary
public BeanComponentDefinition(BeanDefinitionHolder beanDefinitionHolder)

Create a new BeanComponentDefinition for the given bean.

Parameters
beanDefinitionHolder:BeanDefinitionHolder

the BeanDefinitionHolder encapsulating the bean definition as well as the name of the bean

Method Detail

equalsback to summary
public boolean equals(Object other)

Overrides org.springframework.beans.factory.config.BeanDefinitionHolder.equals.

This implementation expects the other object to be of type BeanComponentDefinition as well, in addition to the superclass's equality requirements.

Parameters
other:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getBeanDefinitionsback to summary
public BeanDefinition[] getBeanDefinitions()

Implements org.springframework.beans.factory.parsing.ComponentDefinition.getBeanDefinitions.

Doc from org.springframework.beans.factory.parsing.ComponentDefinition.getBeanDefinitions.

Return the BeanDefinitions that were registered to form this ComponentDefinition.

It should be noted that a ComponentDefinition may well be related with other BeanDefinitions via references, however these are not included as they may be not available immediately. Important BeanReferences are available from getBeanReferences().

Returns:BeanDefinition[]

the array of BeanDefinitions, or an empty array if none

Annotations
@Override
getBeanReferencesback to summary
public BeanReference[] getBeanReferences()

Implements org.springframework.beans.factory.parsing.ComponentDefinition.getBeanReferences.

Doc from org.springframework.beans.factory.parsing.ComponentDefinition.getBeanReferences.

Return the set of BeanReferences that are considered to be important to this ComponentDefinition.

Other BeanReferences may exist within the associated BeanDefinitions, however these are not considered to be needed for validation or for user visualization.

Returns:BeanReference[]

the array of BeanReferences, or an empty array if none

Annotations
@Override
getDescriptionback to summary
public String getDescription()

Implements org.springframework.beans.factory.parsing.ComponentDefinition.getDescription.

Doc from org.springframework.beans.factory.parsing.ComponentDefinition.getDescription.

Return a friendly description of the described component.

Implementations are encouraged to return the same value from toString().

Annotations
@Override
getInnerBeanDefinitionsback to summary
public BeanDefinition[] getInnerBeanDefinitions()

Implements org.springframework.beans.factory.parsing.ComponentDefinition.getInnerBeanDefinitions.

Doc from org.springframework.beans.factory.parsing.ComponentDefinition.getInnerBeanDefinitions.

Return the BeanDefinitions 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.

Returns:BeanDefinition[]

the array of BeanDefinitions, or an empty array if none

Annotations
@Override
getNameback to summary
public String getName()

Implements org.springframework.beans.factory.parsing.ComponentDefinition.getName.

Doc from org.springframework.beans.factory.parsing.ComponentDefinition.getName.

Get the user-visible name of this ComponentDefinition.

This should link back directly to the corresponding configuration data for this component in a given context.

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.springframework.beans.factory.config.BeanDefinitionHolder.toString.

This implementation returns this ComponentDefinition's description.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override
See Also
getDescription()