类 BeanComponentDefinition
- java.lang.Object
- org.springframework.beans.factory.config.BeanDefinitionHolder
- org.springframework.beans.factory.parsing.BeanComponentDefinition
- 所有已实现的接口:
BeanMetadataElement,ComponentDefinition
public class BeanComponentDefinition extends BeanDefinitionHolder implements ComponentDefinition
ComponentDefinition based on a standard BeanDefinition, exposing the given bean definition as well as inner bean definitions and bean references for the given bean.- 从以下版本开始:
- 2.0
- 作者:
- Rob Harrop, Juergen Hoeller
构造器概要
构造器 构造器 说明 BeanComponentDefinition(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.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanequals(Object other)This implementations expects the other object to be of type BeanComponentDefinition as well, in addition to the superclass's equality requirements.BeanDefinition[]getBeanDefinitions()Return theBeanDefinitionsthat were registered to form thisComponentDefinition.BeanReference[]getBeanReferences()Return the set ofBeanReferencesthat are considered to be important to thisComponentDefinition.StringgetDescription()Return a friendly description of the described component.BeanDefinition[]getInnerBeanDefinitions()Return theBeanDefinitionsthat represent all relevant inner beans within this component.StringgetName()Get the user-visible name of thisComponentDefinition.StringtoString()This implementation returns this ComponentDefinition's description.从类继承的方法 org.springframework.beans.factory.config.BeanDefinitionHolder
getAliases, getBeanDefinition, getBeanName, getLongDescription, getShortDescription, getSource, hashCode, matchesName
从接口继承的方法 org.springframework.beans.BeanMetadataElement
getSource
构造器详细资料
BeanComponentDefinition
public BeanComponentDefinition(BeanDefinition beanDefinition, String beanName)
Create a new BeanComponentDefinition for the given bean.- 参数:
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.- 参数:
beanDefinition- the BeanDefinitionbeanName- the name of the beanaliases- alias names for the bean, ornullif none
BeanComponentDefinition
public BeanComponentDefinition(BeanDefinitionHolder beanDefinitionHolder)
Create a new BeanComponentDefinition for the given bean.- 参数:
beanDefinitionHolder- the BeanDefinitionHolder encapsulating the bean definition as well as the name of the bean
方法详细资料
getName
public String getName()
从接口复制的说明:ComponentDefinitionGet the user-visible name of thisComponentDefinition.This should link back directly to the corresponding configuration data for this component in a given context.
- 指定者:
getName在接口中ComponentDefinition
getDescription
public String getDescription()
从接口复制的说明:ComponentDefinitionReturn a friendly description of the described component.Implementations are encouraged to return the same value from
toString().- 指定者:
getDescription在接口中ComponentDefinition
getBeanDefinitions
public BeanDefinition[] getBeanDefinitions()
从接口复制的说明:ComponentDefinitionReturn theBeanDefinitionsthat were registered to form thisComponentDefinition.It should be noted that a
ComponentDefinitionmay well be related with otherBeanDefinitionsviareferences, however these are not included as they may be not available immediately. ImportantBeanReferencesare available fromComponentDefinition.getBeanReferences().- 指定者:
getBeanDefinitions在接口中ComponentDefinition- 返回:
- the array of BeanDefinitions, or an empty array if none
getInnerBeanDefinitions
public BeanDefinition[] getInnerBeanDefinitions()
从接口复制的说明:ComponentDefinitionReturn theBeanDefinitionsthat 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.- 指定者:
getInnerBeanDefinitions在接口中ComponentDefinition- 返回:
- the array of BeanDefinitions, or an empty array if none
getBeanReferences
public BeanReference[] getBeanReferences()
从接口复制的说明:ComponentDefinitionReturn the set ofBeanReferencesthat are considered to be important to thisComponentDefinition.Other
BeanReferencesmay exist within the associatedBeanDefinitions, however these are not considered to be needed for validation or for user visualization.- 指定者:
getBeanReferences在接口中ComponentDefinition- 返回:
- the array of BeanReferences, or an empty array if none
toString
public String toString()
This implementation returns this ComponentDefinition's description.- 覆盖:
toString在类中BeanDefinitionHolder- 另请参阅:
getDescription()
equals
public boolean equals(@Nullable Object other)
This implementations expects the other object to be of type BeanComponentDefinition as well, in addition to the superclass's equality requirements.- 覆盖:
equals在类中BeanDefinitionHolder