org.springframework.beans.factory.support
Class GenericBeanDefinition
java.lang.Object
org.springframework.core.AttributeAccessorSupport
org.springframework.beans.BeanMetadataAttributeAccessor
org.springframework.beans.factory.support.AbstractBeanDefinition
org.springframework.beans.factory.support.GenericBeanDefinition
- All Implemented Interfaces:
- Serializable, Cloneable, BeanMetadataElement, BeanDefinition, AttributeAccessor
- Direct Known Subclasses:
- AnnotatedGenericBeanDefinition, ScannedGenericBeanDefinition
public class GenericBeanDefinition
- extends AbstractBeanDefinition
GenericBeanDefinition is a one-stop shop for standard bean definition purposes.
Like any bean definition, it allows for specifying a class plus optionally
constructor argument values and property values. Additionally, deriving from a
parent bean definition can be flexibly configured through the "parentName" property.
In general, use this GenericBeanDefinition
class for the purpose of
registering user-visible bean definitions (which a post-processor might operate on,
potentially even reconfiguring the parent name). Use RootBeanDefinition
/
ChildBeanDefinition
where parent/child relationships happen to be pre-determined.
- Since:
- 2.5
- Author:
- Juergen Hoeller
- See Also:
setParentName(java.lang.String)
,
RootBeanDefinition
,
ChildBeanDefinition
,
Serialized Form
Fields inherited from class org.springframework.beans.factory.support.AbstractBeanDefinition |
AUTOWIRE_AUTODETECT, AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_CONSTRUCTOR, AUTOWIRE_NO, DEPENDENCY_CHECK_ALL, DEPENDENCY_CHECK_NONE, DEPENDENCY_CHECK_OBJECTS, DEPENDENCY_CHECK_SIMPLE, INFER_METHOD, SCOPE_DEFAULT |
Methods inherited from class org.springframework.beans.factory.support.AbstractBeanDefinition |
addQualifier, applyDefaults, clone, copyQualifiersFrom, getAutowireMode, getBeanClass, getBeanClassName, getConstructorArgumentValues, getDependencyCheck, getDependsOn, getDescription, getDestroyMethodName, getFactoryBeanName, getFactoryMethodName, getInitMethodName, getMethodOverrides, getOriginatingBeanDefinition, getPropertyValues, getQualifier, getQualifiers, getResolvedAutowireMode, getResource, getResourceDescription, getRole, getScope, hasBeanClass, hasConstructorArgumentValues, hashCode, hasQualifier, isAbstract, isAutowireCandidate, isEnforceDestroyMethod, isEnforceInitMethod, isLazyInit, isLenientConstructorResolution, isNonPublicAccessAllowed, 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, setLenientConstructorResolution, setMethodOverrides, setNonPublicAccessAllowed, setOriginatingBeanDefinition, setPrimary, setPropertyValues, setResource, setResourceDescription, setRole, setScope, setSingleton, setSynthetic, validate |
GenericBeanDefinition
public GenericBeanDefinition()
- Create a new GenericBeanDefinition, to be configured through its bean
properties and configuration methods.
- See Also:
AbstractBeanDefinition.setBeanClass(java.lang.Class>)
,
AbstractBeanDefinition.setBeanClassName(java.lang.String)
,
AbstractBeanDefinition.setScope(java.lang.String)
,
AbstractBeanDefinition.setAutowireMode(int)
,
AbstractBeanDefinition.setDependencyCheck(int)
,
AbstractBeanDefinition.setConstructorArgumentValues(org.springframework.beans.factory.config.ConstructorArgumentValues)
,
AbstractBeanDefinition.setPropertyValues(org.springframework.beans.MutablePropertyValues)
GenericBeanDefinition
public GenericBeanDefinition(BeanDefinition original)
- Create a new GenericBeanDefinition as deep copy of the given
bean definition.
- Parameters:
original
- the original bean definition to copy from
setParentName
public void setParentName(String parentName)
- Description copied from interface:
BeanDefinition
- Set the name of the parent definition of this bean definition, if any.
getParentName
public String getParentName()
- Description copied from interface:
BeanDefinition
- Return the name of the parent definition of this bean definition, if any.
cloneBeanDefinition
public AbstractBeanDefinition cloneBeanDefinition()
- Description copied from class:
AbstractBeanDefinition
- Clone this bean definition.
To be implemented by concrete subclasses.
- Specified by:
cloneBeanDefinition
in class AbstractBeanDefinition
- Returns:
- the cloned bean definition object
equals
public boolean equals(Object other)
- Overrides:
equals
in class AbstractBeanDefinition
toString
public String toString()
- Overrides:
toString
in class AbstractBeanDefinition