Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » beans » factory » config » [javadoc | source]
org.springframework.beans.factory.config
public class: BeanDefinitionHolder [javadoc | source]
java.lang.Object
   org.springframework.beans.factory.config.BeanDefinitionHolder

All Implemented Interfaces:
    BeanMetadataElement

Direct Known Subclasses:
    BeanComponentDefinition

Holder for a BeanDefinition with name and aliases. Can be registered as a placeholder for an inner bean.

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.

Constructor:
 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 not deeply copied.

    Parameters:
    beanDefinitionHolder - the BeanDefinitionHolder to copy
 public BeanDefinitionHolder(BeanDefinition beanDefinition,
    String beanName) 
    Create a new BeanDefinitionHolder.
    Parameters:
    beanDefinition - the BeanDefinition to wrap
    beanName - the name of the bean, as specified for the bean definition
 public BeanDefinitionHolder(BeanDefinition beanDefinition,
    String beanName,
    String[] aliases) 
    Create a new BeanDefinitionHolder.
    Parameters:
    beanDefinition - the BeanDefinition to wrap
    beanName - the name of the bean, as specified for the bean definition
    aliases - alias names for the bean, or null if none
Method from org.springframework.beans.factory.config.BeanDefinitionHolder Summary:
equals,   getAliases,   getBeanDefinition,   getBeanName,   getLongDescription,   getShortDescription,   getSource,   hashCode,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.beans.factory.config.BeanDefinitionHolder Detail:
 public boolean equals(Object other) 
 public String[] getAliases() 
    Return the alias names for the bean, as specified directly for the bean definition.
 public BeanDefinition getBeanDefinition() 
    Return the wrapped BeanDefinition.
 public String getBeanName() 
    Return the primary name of the bean, as specified for the bean definition.
 public String getLongDescription() 
    Return a long description for the bean, including name and aliases as well as a description of the contained BeanDefinition .
 public String getShortDescription() 
    Return a friendly, short description for the bean, stating name and aliases.
 public Object getSource() 
    Expose the bean definition's source object.
 public int hashCode() 
 public String toString() 
    This implementation returns the long description. Can be overridden to return the short description or any kind of custom description instead.