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
GenericBeanDefinition is a one-stop shop for declarative bean definition purposes.
 Like all common bean definitions, 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 declarative bean definitions (e.g. XML definitions which a bean
 post-processor might operate on, potentially even reconfiguring the parent name).
 Use RootBeanDefinition/ChildBeanDefinition where parent/child
 relationships happen to be pre-determined, and prefer RootBeanDefinition
 specifically for programmatic definitions derived from factory methods/suppliers.
- Since:
- 2.5
- Author:
- Juergen Hoeller
- See Also:
- 
Field SummaryFields inherited from class org.springframework.beans.factory.support.AbstractBeanDefinitionAUTOWIRE_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, ORDER_ATTRIBUTE, PREFERRED_CONSTRUCTORS_ATTRIBUTE, SCOPE_DEFAULTFields inherited from interface org.springframework.beans.factory.config.BeanDefinitionROLE_APPLICATION, ROLE_INFRASTRUCTURE, ROLE_SUPPORT, SCOPE_PROTOTYPE, SCOPE_SINGLETON
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a new GenericBeanDefinition, to be configured through its bean properties and configuration methods.GenericBeanDefinition(BeanDefinition original) Create a new GenericBeanDefinition as deep copy of the given bean definition.
- 
Method SummaryModifier and TypeMethodDescriptionClone this bean definition.booleanReturn the name of the parent definition of this bean definition, if any.voidsetParentName(String parentName) Set the name of the parent definition of this bean definition, if any.toString()Methods inherited from class org.springframework.beans.factory.support.AbstractBeanDefinitionaddQualifier, applyDefaults, clone, copyQualifiersFrom, getAutowireMode, getBeanClass, getBeanClassName, getConstructorArgumentValues, getDependencyCheck, getDependsOn, getDescription, getDestroyMethodName, getDestroyMethodNames, getFactoryBeanName, getFactoryMethodName, getInitMethodName, getInitMethodNames, getInstanceSupplier, getLazyInit, getMethodOverrides, getOriginatingBeanDefinition, getPropertyValues, getQualifier, getQualifiers, getResolvableType, getResolvedAutowireMode, getResource, getResourceDescription, getRole, getScope, hasBeanClass, hasConstructorArgumentValues, hashCode, hasMethodOverrides, hasPropertyValues, hasQualifier, isAbstract, isAutowireCandidate, isBackgroundInit, isDefaultCandidate, isEnforceDestroyMethod, isEnforceInitMethod, isFallback, isLazyInit, isLenientConstructorResolution, isNonPublicAccessAllowed, isPrimary, isPrototype, isSingleton, isSynthetic, overrideFrom, prepareMethodOverride, prepareMethodOverrides, resolveBeanClass, setAbstract, setAutowireCandidate, setAutowireMode, setBackgroundInit, setBeanClass, setBeanClassName, setConstructorArgumentValues, setDefaultCandidate, setDependencyCheck, setDependsOn, setDescription, setDestroyMethodName, setDestroyMethodNames, setEnforceDestroyMethod, setEnforceInitMethod, setFactoryBeanName, setFactoryMethodName, setFallback, setInitMethodName, setInitMethodNames, setInstanceSupplier, setLazyInit, setLenientConstructorResolution, setMethodOverrides, setNonPublicAccessAllowed, setOriginatingBeanDefinition, setPrimary, setPropertyValues, setResource, setResourceDescription, setRole, setScope, setSynthetic, validateMethods inherited from class org.springframework.beans.BeanMetadataAttributeAccessoraddMetadataAttribute, getAttribute, getMetadataAttribute, getSource, removeAttribute, setAttribute, setSourceMethods inherited from class org.springframework.core.AttributeAccessorSupportattributeNames, computeAttribute, copyAttributesFrom, hasAttributeMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.core.AttributeAccessorattributeNames, computeAttribute, getAttribute, hasAttribute, removeAttribute, setAttributeMethods inherited from interface org.springframework.beans.BeanMetadataElementgetSource
- 
Constructor Details- 
GenericBeanDefinitionpublic GenericBeanDefinition()Create a new GenericBeanDefinition, to be configured through its bean properties and configuration methods.- See Also:
- 
- AbstractBeanDefinition.setBeanClass(java.lang.Class<?>)
- AbstractBeanDefinition.setScope(java.lang.String)
- AbstractBeanDefinition.setConstructorArgumentValues(org.springframework.beans.factory.config.ConstructorArgumentValues)
- AbstractBeanDefinition.setPropertyValues(org.springframework.beans.MutablePropertyValues)
 
 
- 
GenericBeanDefinitionCreate a new GenericBeanDefinition as deep copy of the given bean definition.- Parameters:
- original- the original bean definition to copy from
 
 
- 
- 
Method Details- 
setParentNameDescription copied from interface:BeanDefinitionSet the name of the parent definition of this bean definition, if any.
- 
getParentNameDescription copied from interface:BeanDefinitionReturn the name of the parent definition of this bean definition, if any.
- 
cloneBeanDefinitionDescription copied from class:AbstractBeanDefinitionClone this bean definition. To be implemented by concrete subclasses.- Specified by:
- cloneBeanDefinitionin class- AbstractBeanDefinition
- Returns:
- the cloned bean definition object
 
- 
equals- Overrides:
- equalsin class- AbstractBeanDefinition
 
- 
toString- Overrides:
- toStringin class- AbstractBeanDefinition
 
 
-