Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » beans » factory » support » [javadoc | source]
org.springframework.beans.factory.support
public class: RootBeanDefinition [javadoc | source]
java.lang.Object
   org.springframework.core.AttributeAccessorSupport
      org.springframework.beans.BeanMetadataAttributeAccessor
         org.springframework.beans.factory.support.AbstractBeanDefinition
            org.springframework.beans.factory.support.RootBeanDefinition

All Implemented Interfaces:
    Cloneable, BeanDefinition, BeanMetadataElement, AttributeAccessor, Serializable

A root bean definition represents the merged bean definition that backs a specific bean in a Spring BeanFactory at runtime. It might have been created from multiple original bean definitions that inherit from each other, typically registered as GenericBeanDefinitions . A root bean definition is essentially the 'unified' bean definition view at runtime.

Root bean definitions may also be used for registering individual bean definitions in the configuration phase. However, since Spring 2.5, the preferred way to register bean definitions programmatically is the GenericBeanDefinition class. GenericBeanDefinition has the advantage that it allows to dynamically define parent dependencies, not 'hard-coding' the role as a root bean definition.

Field Summary
volatile  Object resolvedConstructorOrFactoryMethod    Package-visible field for caching the resolved constructor or factory method 
volatile  Object[] resolvedConstructorArguments    Package-visible field for caching fully resolved constructor arguments 
volatile  Object[] preparedConstructorArguments    Package-visible field for caching partly prepared constructor arguments 
volatile  boolean constructorArgumentsResolved    Package-visible field that marks the constructor arguments as resolved 
volatile  Boolean beforeInstantiationResolved    Package-visible field that indicates a before-instantiation post-processor having kicked in 
 boolean postProcessed    Package-visible field that indicates MergedBeanDefinitionPostProcessor having been applied 
final  Object postProcessingLock     
Fields inherited from org.springframework.beans.factory.support.AbstractBeanDefinition:
AUTOWIRE_NO,  AUTOWIRE_BY_NAME,  AUTOWIRE_BY_TYPE,  AUTOWIRE_CONSTRUCTOR,  AUTOWIRE_AUTODETECT,  DEPENDENCY_CHECK_NONE,  DEPENDENCY_CHECK_OBJECTS,  DEPENDENCY_CHECK_SIMPLE,  DEPENDENCY_CHECK_ALL
Constructor:
 public RootBeanDefinition() 
 public RootBeanDefinition(Class beanClass) 
    Create a new RootBeanDefinition for a singleton.
    Parameters:
    beanClass - the class of the bean to instantiate
 public RootBeanDefinition(RootBeanDefinition original) 
    Create a new RootBeanDefinition as deep copy of the given bean definition.
    Parameters:
    original - the original bean definition to copy from
 RootBeanDefinition(BeanDefinition original) 
    Create a new RootBeanDefinition as deep copy of the given bean definition.
    Parameters:
    original - the original bean definition to copy from
 public RootBeanDefinition(Class beanClass,
    boolean singleton) 
    Create a new RootBeanDefinition with the given singleton status.
    Parameters:
    beanClass - the class of the bean to instantiate
    singleton - the singleton status of the bean
 public RootBeanDefinition(Class beanClass,
    int autowireMode) 
    Create a new RootBeanDefinition for a singleton, using the given autowire mode.
    Parameters:
    beanClass - the class of the bean to instantiate
    autowireMode - by name or type, using the constants in this interface
 public RootBeanDefinition(Class beanClass,
    MutablePropertyValues pvs) 
    Create a new RootBeanDefinition for a singleton, providing property values.
    Parameters:
    beanClass - the class of the bean to instantiate
    pvs - the property values to apply
 public RootBeanDefinition(Class beanClass,
    int autowireMode,
    boolean dependencyCheck) 
    Create a new RootBeanDefinition for a singleton, using the given autowire mode.
    Parameters:
    beanClass - the class of the bean to instantiate
    autowireMode - by name or type, using the constants in this interface
    dependencyCheck - whether to perform a dependency check for objects (not applicable to autowiring a constructor, thus ignored there)
 public RootBeanDefinition(Class beanClass,
    MutablePropertyValues pvs,
    boolean singleton) 
    Create a new RootBeanDefinition with the given singleton status, providing property values.
    Parameters:
    beanClass - the class of the bean to instantiate
    pvs - the property values to apply
    singleton - the singleton status of the bean
 public RootBeanDefinition(Class beanClass,
    ConstructorArgumentValues cargs,
    MutablePropertyValues pvs) 
    Create a new RootBeanDefinition for a singleton, providing constructor arguments and property values.
    Parameters:
    beanClass - the class of the bean to instantiate
    cargs - the constructor argument values to apply
    pvs - the property values to apply
 public RootBeanDefinition(String beanClassName,
    ConstructorArgumentValues cargs,
    MutablePropertyValues pvs) 
    Create a new RootBeanDefinition for a singleton, providing constructor arguments and property values.

    Takes a bean class name to avoid eager loading of the bean class.

    Parameters:
    beanClassName - the name of the class to instantiate
    cargs - the constructor argument values to apply
    pvs - the property values to apply
Method from org.springframework.beans.factory.support.RootBeanDefinition Summary:
cloneBeanDefinition,   equals,   getParentName,   isExternallyManagedConfigMember,   isExternallyManagedDestroyMethod,   isExternallyManagedInitMethod,   registerExternallyManagedConfigMember,   registerExternallyManagedDestroyMethod,   registerExternallyManagedInitMethod,   setParentName,   toString
Methods from org.springframework.beans.factory.support.AbstractBeanDefinition:
addQualifier,   applyDefaults,   clone,   cloneBeanDefinition,   copyQualifiersFrom,   equals,   getAutowireMode,   getBeanClass,   getBeanClassName,   getConstructorArgumentValues,   getDependencyCheck,   getDependsOn,   getDescription,   getDestroyMethodName,   getFactoryBeanName,   getFactoryMethodName,   getInitMethodName,   getMethodOverrides,   getOriginatingBeanDefinition,   getPropertyValues,   getQualifier,   getQualifiers,   getResolvedAutowireMode,   getResource,   getResourceDescription,   getRole,   getScope,   hasBeanClass,   hasConstructorArgumentValues,   hasQualifier,   hashCode,   isAbstract,   isAutowireCandidate,   isEnforceDestroyMethod,   isEnforceInitMethod,   isLazyInit,   isPrimary,   isPrototype,   isSingleton,   isSynthetic,   overrideFrom,   overrideFrom,   prepareMethodOverride,   prepareMethodOverrides,   resolveBeanClass,   setAbstract,   setAutowireCandidate,   setAutowireMode,   setBeanClass,   setBeanClassName,   setConstructorArgumentValues,   setDependencyCheck,   setDependsOn,   setDescription,   setDestroyMethodName,   setEnforceDestroyMethod,   setEnforceInitMethod,   setFactoryBeanName,   setFactoryMethodName,   setInitMethodName,   setLazyInit,   setMethodOverrides,   setOriginatingBeanDefinition,   setPrimary,   setPropertyValues,   setResource,   setResourceDescription,   setRole,   setScope,   setSingleton,   setSynthetic,   toString,   validate
Methods from org.springframework.beans.BeanMetadataAttributeAccessor:
addMetadataAttribute,   getAttribute,   getMetadataAttribute,   getSource,   removeAttribute,   setAttribute,   setSource
Methods from org.springframework.core.AttributeAccessorSupport:
attributeNames,   copyAttributesFrom,   equals,   getAttribute,   hasAttribute,   hashCode,   removeAttribute,   setAttribute
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.beans.factory.support.RootBeanDefinition Detail:
 public AbstractBeanDefinition cloneBeanDefinition() 
 public boolean equals(Object other) 
 public String getParentName() 
 public boolean isExternallyManagedConfigMember(Member configMember) 
 public boolean isExternallyManagedDestroyMethod(String destroyMethod) 
 public boolean isExternallyManagedInitMethod(String initMethod) 
 public  void registerExternallyManagedConfigMember(Member configMember) 
 public  void registerExternallyManagedDestroyMethod(String destroyMethod) 
 public  void registerExternallyManagedInitMethod(String initMethod) 
 public  void setParentName(String parentName) 
 public String toString()