org.springframework.beans.factory.config
Class BeanDefinitionHolder

java.lang.Object
  extended byorg.springframework.beans.factory.config.BeanDefinitionHolder

public class BeanDefinitionHolder
extends Object

Holder for a BeanDefinition with name and aliases.

Recognized by AbstractAutowireCapableBeanFactory for inner bean definitions. Registered by DefaultXmlBeanDefinitionParser, which also uses it as general holder for a parsed bean definition.

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.

Since:
1.0.2
Author:
Juergen Hoeller
See Also:
AbstractAutowireCapableBeanFactory.resolveValueIfNecessary(java.lang.String, org.springframework.beans.factory.support.RootBeanDefinition, java.lang.String, java.lang.Object), DefaultXmlBeanDefinitionParser.parseBeanDefinition(org.w3c.dom.Element), BeanNameAware

Constructor Summary
BeanDefinitionHolder(BeanDefinition beanDefinition, String beanName)
          Create a new BeanDefinitionHolder.
BeanDefinitionHolder(BeanDefinition beanDefinition, String beanName, String[] aliases)
          Create a new BeanDefinitionHolder.
 
Method Summary
 String[] getAliases()
           
 BeanDefinition getBeanDefinition()
           
 String getBeanName()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BeanDefinitionHolder

public BeanDefinitionHolder(BeanDefinition beanDefinition,
                            String beanName)
Create a new BeanDefinitionHolder.

Parameters:
beanDefinition - the BeanDefinition
beanName - the name of the bean

BeanDefinitionHolder

public BeanDefinitionHolder(BeanDefinition beanDefinition,
                            String beanName,
                            String[] aliases)
Create a new BeanDefinitionHolder.

Parameters:
beanDefinition - the BeanDefinition
beanName - the name of the bean
aliases - alias names of the bean, or null if none
Method Detail

getBeanDefinition

public BeanDefinition getBeanDefinition()

getBeanName

public String getBeanName()

getAliases

public String[] getAliases()

toString

public String toString()


Copyright (C) 2003-2004 The Spring Framework Project.