java.lang.Object | ||||
↳ | org.springframework.core.AttributeAccessorSupport | |||
↳ | org.springframework.beans.BeanMetadataAttributeAccessor | |||
↳ | org.springframework.beans.factory.support.AbstractBeanDefinition | |||
↳ | org.springframework.beans.factory.support.RootBeanDefinition |
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.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.beans.factory.support.AbstractBeanDefinition
| |||||||||||
From interface
org.springframework.beans.factory.config.BeanDefinition
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new RootBeanDefinition, to be configured through its bean
properties and configuration methods.
| |||||||||||
Create a new RootBeanDefinition for a singleton.
| |||||||||||
This constructor is deprecated.
since Spring 2.5, in favor of
setScope(String)
| |||||||||||
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.
| |||||||||||
This constructor is deprecated.
as of Spring 3.0, in favor of
getPropertyValues() usage
| |||||||||||
This constructor is deprecated.
since Spring 2.5, in favor of
setScope(String)
| |||||||||||
Create a new RootBeanDefinition for a singleton,
providing constructor arguments and property values.
| |||||||||||
Create a new RootBeanDefinition for a singleton,
providing constructor arguments and property values.
| |||||||||||
Create a new RootBeanDefinition for a singleton,
providing constructor arguments and property values.
| |||||||||||
Create a new RootBeanDefinition as deep copy of the given
bean definition.
|
[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
|
Create a new RootBeanDefinition, to be configured through its bean properties and configuration methods.
Create a new RootBeanDefinition for a singleton.
beanClass | the class of the bean to instantiate |
---|
This constructor is deprecated.
since Spring 2.5, in favor of setScope(String)
Create a new RootBeanDefinition with the given singleton status.
beanClass | the class of the bean to instantiate |
---|---|
singleton | the singleton status of the bean |
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.
beanClass | the class of the bean to instantiate |
---|---|
autowireMode | by name or type, using the constants in this interface |
Create a new RootBeanDefinition for a singleton, using the given autowire mode.
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) |
This constructor is deprecated.
as of Spring 3.0, in favor of getPropertyValues()
usage
Create a new RootBeanDefinition for a singleton, providing property values.
beanClass | the class of the bean to instantiate |
---|---|
pvs | the property values to apply |
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.
beanClass | the class of the bean to instantiate |
---|---|
pvs | the property values to apply |
singleton | the singleton status of the bean |
Create a new RootBeanDefinition for a singleton, providing constructor arguments and property values.
beanClass | the class of the bean to instantiate |
---|---|
cargs | the constructor argument values to apply |
pvs | the property values to apply |
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.
beanClassName | the name of the class to instantiate |
---|
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.
beanClassName | the name of the class to instantiate |
---|---|
cargs | the constructor argument values to apply |
pvs | the property values to apply |
Create a new RootBeanDefinition as deep copy of the given bean definition.
original | the original bean definition to copy from |
---|
Clone this bean definition. To be implemented by concrete subclasses.
Return the resolved factory method as a Java Method object, if available.
null
if not found or not resolved yet
Check whether the given candidate qualifies as a factory method.
Specify a factory method name that refers to a non-overloaded method.