public class

RootBeanDefinition

extends AbstractBeanDefinition
java.lang.Object
   ↳ org.springframework.core.AttributeAccessorSupport
     ↳ org.springframework.beans.BeanMetadataAttributeAccessor
       ↳ org.springframework.beans.factory.support.AbstractBeanDefinition
         ↳ org.springframework.beans.factory.support.RootBeanDefinition

Class Overview

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.

Summary

[Expand]
Inherited Constants
From class org.springframework.beans.factory.support.AbstractBeanDefinition
From interface org.springframework.beans.factory.config.BeanDefinition
Public Constructors
RootBeanDefinition()
Create a new RootBeanDefinition, to be configured through its bean properties and configuration methods.
RootBeanDefinition(Class beanClass)
Create a new RootBeanDefinition for a singleton.
RootBeanDefinition(Class beanClass, boolean singleton)
This constructor is deprecated. since Spring 2.5, in favor of setScope(String)
RootBeanDefinition(Class beanClass, int autowireMode)
This constructor is deprecated. as of Spring 3.0, in favor of setAutowireMode(int) usage
RootBeanDefinition(Class beanClass, int autowireMode, boolean dependencyCheck)
Create a new RootBeanDefinition for a singleton, using the given autowire mode.
RootBeanDefinition(Class beanClass, MutablePropertyValues pvs)
This constructor is deprecated. as of Spring 3.0, in favor of getPropertyValues() usage
RootBeanDefinition(Class beanClass, MutablePropertyValues pvs, boolean singleton)
This constructor is deprecated. since Spring 2.5, in favor of setScope(String)
RootBeanDefinition(Class beanClass, ConstructorArgumentValues cargs, MutablePropertyValues pvs)
Create a new RootBeanDefinition for a singleton, providing constructor arguments and property values.
RootBeanDefinition(String beanClassName)
Create a new RootBeanDefinition for a singleton, providing constructor arguments and property values.
RootBeanDefinition(String beanClassName, ConstructorArgumentValues cargs, MutablePropertyValues pvs)
Create a new RootBeanDefinition for a singleton, providing constructor arguments and property values.
RootBeanDefinition(RootBeanDefinition original)
Create a new RootBeanDefinition as deep copy of the given bean definition.
Public Methods
RootBeanDefinition cloneBeanDefinition()
Clone this bean definition.
boolean equals(Object other)
BeanDefinitionHolder getDecoratedDefinition()
String getParentName()
Method getResolvedFactoryMethod()
Return the resolved factory method as a Java Method object, if available.
boolean isExternallyManagedConfigMember(Member configMember)
boolean isExternallyManagedDestroyMethod(String destroyMethod)
boolean isExternallyManagedInitMethod(String initMethod)
boolean isFactoryMethod(Method candidate)
Check whether the given candidate qualifies as a factory method.
void registerExternallyManagedConfigMember(Member configMember)
void registerExternallyManagedDestroyMethod(String destroyMethod)
void registerExternallyManagedInitMethod(String initMethod)
void setDecoratedDefinition(BeanDefinitionHolder decoratedDefinition)
void setParentName(String parentName)
void setUniqueFactoryMethodName(String name)
Specify a factory method name that refers to a non-overloaded method.
String toString()
[Expand]
Inherited Methods
From class org.springframework.beans.factory.support.AbstractBeanDefinition
From class org.springframework.beans.BeanMetadataAttributeAccessor
From class org.springframework.core.AttributeAccessorSupport
From class java.lang.Object
From interface org.springframework.beans.BeanMetadataElement
From interface org.springframework.beans.factory.config.BeanDefinition
From interface org.springframework.core.AttributeAccessor

Public Constructors

public RootBeanDefinition ()

Also: SpringBeans

public RootBeanDefinition (Class beanClass)

Also: SpringBeans

Create a new RootBeanDefinition for a singleton.

Parameters
beanClass the class of the bean to instantiate

public RootBeanDefinition (Class beanClass, boolean singleton)

Also: SpringBeans

This constructor is deprecated.
since Spring 2.5, in favor of setScope(String)

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)

Also: SpringBeans

This constructor is deprecated.
as of Spring 3.0, in favor of setAutowireMode(int) usage

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, int autowireMode, boolean dependencyCheck)

Also: SpringBeans

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)

Also: SpringBeans

This constructor is deprecated.
as of Spring 3.0, in favor of getPropertyValues() usage

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, MutablePropertyValues pvs, boolean singleton)

Also: SpringBeans

This constructor is deprecated.
since Spring 2.5, in favor of setScope(String)

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)

Also: SpringBeans

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)

Also: SpringBeans

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

public RootBeanDefinition (String beanClassName, ConstructorArgumentValues cargs, MutablePropertyValues pvs)

Also: SpringBeans

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

public RootBeanDefinition (RootBeanDefinition original)

Also: SpringBeans

Create a new RootBeanDefinition as deep copy of the given bean definition.

Parameters
original the original bean definition to copy from

Public Methods

public RootBeanDefinition cloneBeanDefinition ()

Also: SpringBeans

Clone this bean definition. To be implemented by concrete subclasses.

Returns
  • the cloned bean definition object

public boolean equals (Object other)

Also: SpringBeans

public BeanDefinitionHolder getDecoratedDefinition ()

Also: SpringBeans

public String getParentName ()

Also: SpringBeans

public Method getResolvedFactoryMethod ()

Also: SpringBeans

Return the resolved factory method as a Java Method object, if available.

Returns
  • the factory method, or null if not found or not resolved yet

public boolean isExternallyManagedConfigMember (Member configMember)

Also: SpringBeans

public boolean isExternallyManagedDestroyMethod (String destroyMethod)

Also: SpringBeans

public boolean isExternallyManagedInitMethod (String initMethod)

Also: SpringBeans

public boolean isFactoryMethod (Method candidate)

Also: SpringBeans

Check whether the given candidate qualifies as a factory method.

public void registerExternallyManagedConfigMember (Member configMember)

Also: SpringBeans

public void registerExternallyManagedDestroyMethod (String destroyMethod)

Also: SpringBeans

public void registerExternallyManagedInitMethod (String initMethod)

Also: SpringBeans

public void setDecoratedDefinition (BeanDefinitionHolder decoratedDefinition)

Also: SpringBeans

public void setParentName (String parentName)

Also: SpringBeans

public void setUniqueFactoryMethodName (String name)

Also: SpringBeans

Specify a factory method name that refers to a non-overloaded method.

public String toString ()

Also: SpringBeans