The Spring Framework

org.springframework.beans.factory.parsing
Class AbstractComponentDefinition

java.lang.Object
  extended by org.springframework.beans.factory.parsing.AbstractComponentDefinition
All Implemented Interfaces:
BeanMetadataElement, ComponentDefinition
Direct Known Subclasses:
AdvisorComponentDefinition, CompositeComponentDefinition, PointcutComponentDefinition

public abstract class AbstractComponentDefinition
extends Object
implements ComponentDefinition

Base implementation of ComponentDefinition that provides a basic implementation of getDescription() which delegates to ComponentDefinition.getName(). Also provides a base implementation of toString() which delegates to getDescription() in keeping with the recommended implementation strategy. Also provides default implementations of getInnerBeanDefinitions() and getBeanReferences() that return an empty array.

Since:
2.0
Author:
Rob Harrop, Juergen Hoeller

Constructor Summary
AbstractComponentDefinition()
           
 
Method Summary
 BeanDefinition[] getBeanDefinitions()
          Returns an empty array.
 BeanReference[] getBeanReferences()
          Returns an empty array.
 String getDescription()
          Delegates to ComponentDefinition.getName().
 BeanDefinition[] getInnerBeanDefinitions()
          Returns an empty array.
 String toString()
          Delegates to getDescription().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.beans.factory.parsing.ComponentDefinition
getName
 
Methods inherited from interface org.springframework.beans.BeanMetadataElement
getSource
 

Constructor Detail

AbstractComponentDefinition

public AbstractComponentDefinition()
Method Detail

getDescription

public String getDescription()
Delegates to ComponentDefinition.getName().

Specified by:
getDescription in interface ComponentDefinition

getBeanDefinitions

public BeanDefinition[] getBeanDefinitions()
Returns an empty array.

Specified by:
getBeanDefinitions in interface ComponentDefinition
Returns:
the array of BeanDefinitions, or an empty array if none

getInnerBeanDefinitions

public BeanDefinition[] getInnerBeanDefinitions()
Returns an empty array.

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

getBeanReferences

public BeanReference[] getBeanReferences()
Returns an empty array.

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

toString

public String toString()
Delegates to getDescription().

Overrides:
toString in class Object

The Spring Framework

Copyright © 2002-2008 The Spring Framework.