类 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 holder)
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.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 boolean
equals(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 theBeanDefinitions
that were registered to form thisComponentDefinition
.BeanReference[]
getBeanReferences()
Return the set ofBeanReferences
that are considered to be important to thisComponentDefinition
.String
getDescription()
Return a friendly description of the described component.BeanDefinition[]
getInnerBeanDefinitions()
Return theBeanDefinitions
that represent all relevant inner beans within this component.String
getName()
Get the user-visible name of thisComponentDefinition
.String
toString()
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, String[] aliases)
Create a new BeanComponentDefinition for the given bean.- 参数:
beanDefinition
- the BeanDefinitionbeanName
- the name of the beanaliases
- alias names for the bean, ornull
if none
BeanComponentDefinition
public BeanComponentDefinition(BeanDefinitionHolder holder)
Create a new BeanComponentDefinition for the given bean.- 参数:
holder
- the BeanDefinitionHolder encapsulating the bean definition as well as the name of the bean
方法详细资料
getName
public String getName()
从接口复制的说明: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.
- 指定者:
getName
在接口中ComponentDefinition
getDescription
public String getDescription()
从接口复制的说明:ComponentDefinition
Return a friendly description of the described component.Implementations are encouraged to return the same value from
toString()
.- 指定者:
getDescription
在接口中ComponentDefinition
getBeanDefinitions
public BeanDefinition[] getBeanDefinitions()
从接口复制的说明: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()
.- 指定者:
getBeanDefinitions
在接口中ComponentDefinition
- 返回:
- the array of BeanDefinitions, or an empty array if none
getInnerBeanDefinitions
public BeanDefinition[] getInnerBeanDefinitions()
从接口复制的说明: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.- 指定者:
getInnerBeanDefinitions
在接口中ComponentDefinition
- 返回:
- the array of BeanDefinitions, or an empty array if none
getBeanReferences
public BeanReference[] getBeanReferences()
从接口复制的说明: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.- 指定者:
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(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