The Spring Framework

org.springframework.beans.factory.parsing
Class BeanComponentDefinition

java.lang.Object
  extended by org.springframework.beans.factory.parsing.AbstractComponentDefinition
      extended by org.springframework.beans.factory.parsing.BeanComponentDefinition
All Implemented Interfaces:
BeanMetadataElement, ComponentDefinition

public class BeanComponentDefinition
extends AbstractComponentDefinition

ComponentDefinition based on a standard BeanDefinition, exposing the given bean definition as well as inner bean definitions and bean references for the given bean.

Since:
2.0
Author:
Rob Harrop, Juergen Hoeller

Constructor Summary
BeanComponentDefinition(BeanDefinitionHolder holder)
          Create a new BeanComponentDefinition for the given bean.
BeanComponentDefinition(BeanDefinition beanDefinition, String beanName)
          Create a new BeanComponentDefinition for the given bean.
 
Method Summary
 BeanDefinition[] getBeanDefinitions()
          Return the BeanDefinitions that were registered to form this ComponentDefinition.
 BeanReference[] getBeanReferences()
          Returns an empty array.
 String getDescription()
          Delegates to ComponentDefinition.getName().
 BeanDefinition[] getInnerBeanDefinitions()
          Returns an empty array.
 String getName()
          Get the user visible name of this ComponentDefinition.
 Object getSource()
          Return the configuration source Object for this metadata element (may be null).
 
Methods inherited from class org.springframework.beans.factory.parsing.AbstractComponentDefinition
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BeanComponentDefinition

public BeanComponentDefinition(BeanDefinition beanDefinition,
                               String beanName)
Create a new BeanComponentDefinition for the given bean.

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

BeanComponentDefinition

public BeanComponentDefinition(BeanDefinitionHolder holder)
Create a new BeanComponentDefinition for the given bean.

Parameters:
holder - the BeanDefinitionHolder encapsulating the bean definition as well as the name of the bean
Method Detail

getName

public String getName()
Description copied from interface: ComponentDefinition
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.


getDescription

public String getDescription()
Description copied from class: AbstractComponentDefinition
Delegates to ComponentDefinition.getName().

Specified by:
getDescription in interface ComponentDefinition
Overrides:
getDescription in class AbstractComponentDefinition

getBeanDefinitions

public BeanDefinition[] getBeanDefinitions()
Description copied from interface: ComponentDefinition
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 ComponentDefinition.getBeanReferences().

Returns:
the array of BeanDefinitions, or an empty array if none

getInnerBeanDefinitions

public BeanDefinition[] getInnerBeanDefinitions()
Description copied from class: AbstractComponentDefinition
Returns an empty array.

Specified by:
getInnerBeanDefinitions in interface ComponentDefinition
Overrides:
getInnerBeanDefinitions in class AbstractComponentDefinition
Returns:
the array of BeanDefinitions, or an empty array if none

getBeanReferences

public BeanReference[] getBeanReferences()
Description copied from class: AbstractComponentDefinition
Returns an empty array.

Specified by:
getBeanReferences in interface ComponentDefinition
Overrides:
getBeanReferences in class AbstractComponentDefinition
Returns:
the array of BeanReferences, or an empty array if none

getSource

public Object getSource()
Description copied from interface: BeanMetadataElement
Return the configuration source Object for this metadata element (may be null).


The Spring Framework

Copyright © 2002-2006 The Spring Framework.