Class AnnotatedGenericBeanDefinition
java.lang.Object
org.springframework.core.AttributeAccessorSupport
org.springframework.beans.BeanMetadataAttributeAccessor
org.springframework.beans.factory.support.AbstractBeanDefinition
org.springframework.beans.factory.support.GenericBeanDefinition
org.springframework.beans.factory.annotation.AnnotatedGenericBeanDefinition
- All Implemented Interfaces:
- Serializable,- Cloneable,- BeanMetadataElement,- AnnotatedBeanDefinition,- BeanDefinition,- AttributeAccessor
public class AnnotatedGenericBeanDefinition
extends GenericBeanDefinition
implements AnnotatedBeanDefinition
Extension of the 
GenericBeanDefinition
 class, adding support for annotation metadata exposed through the
 AnnotatedBeanDefinition interface.
 This GenericBeanDefinition variant is mainly useful for testing code that expects
 to operate on an AnnotatedBeanDefinition, for example strategy implementations
 in Spring's component scanning support (where the default definition class is
 ScannedGenericBeanDefinition,
 which also implements the AnnotatedBeanDefinition interface).
- Since:
- 2.5
- Author:
- Juergen Hoeller, Chris Beams
- 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 SummaryConstructorsConstructorDescriptionAnnotatedGenericBeanDefinition(Class<?> beanClass) Create a new AnnotatedGenericBeanDefinition for the given bean class.Create a new AnnotatedGenericBeanDefinition for the given annotation metadata, allowing for ASM-based processing and avoidance of early loading of the bean class.AnnotatedGenericBeanDefinition(AnnotationMetadata metadata, MethodMetadata factoryMethodMetadata) Create a new AnnotatedGenericBeanDefinition for the given annotation metadata, based on an annotated class and a factory method on that class.
- 
Method SummaryModifier and TypeMethodDescriptionfinal MethodMetadataObtain metadata for this bean definition's factory method, if any.final AnnotationMetadataObtain the annotation metadata (as well as basic class metadata) for this bean definition's bean class.Methods inherited from class org.springframework.beans.factory.support.GenericBeanDefinitioncloneBeanDefinition, equals, getParentName, setParentName, toStringMethods 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.factory.config.BeanDefinitiongetBeanClassName, getConstructorArgumentValues, getDependsOn, getDescription, getDestroyMethodName, getFactoryBeanName, getFactoryMethodName, getInitMethodName, getOriginatingBeanDefinition, getParentName, getPropertyValues, getResolvableType, getResourceDescription, getRole, getScope, hasConstructorArgumentValues, hasPropertyValues, isAbstract, isAutowireCandidate, isFallback, isLazyInit, isPrimary, isPrototype, isSingleton, setAutowireCandidate, setBeanClassName, setDependsOn, setDescription, setDestroyMethodName, setFactoryBeanName, setFactoryMethodName, setFallback, setInitMethodName, setLazyInit, setParentName, setPrimary, setRole, setScopeMethods inherited from interface org.springframework.beans.BeanMetadataElementgetSource
- 
Constructor Details- 
AnnotatedGenericBeanDefinitionCreate a new AnnotatedGenericBeanDefinition for the given bean class.- Parameters:
- beanClass- the loaded bean class
 
- 
AnnotatedGenericBeanDefinitionCreate a new AnnotatedGenericBeanDefinition for the given annotation metadata, allowing for ASM-based processing and avoidance of early loading of the bean class. Note that this constructor is functionally equivalent toScannedGenericBeanDefinition, however the semantics of the latter indicate that a bean was discovered specifically via component-scanning as opposed to other means.- Parameters:
- metadata- the annotation metadata for the bean class in question
- Since:
- 3.1.1
 
- 
AnnotatedGenericBeanDefinitionpublic AnnotatedGenericBeanDefinition(AnnotationMetadata metadata, MethodMetadata factoryMethodMetadata) Create a new AnnotatedGenericBeanDefinition for the given annotation metadata, based on an annotated class and a factory method on that class.- Parameters:
- metadata- the annotation metadata for the bean class in question
- factoryMethodMetadata- metadata for the selected factory method
- Since:
- 4.1.1
 
 
- 
- 
Method Details- 
getMetadataDescription copied from interface:AnnotatedBeanDefinitionObtain the annotation metadata (as well as basic class metadata) for this bean definition's bean class.- Specified by:
- getMetadatain interface- AnnotatedBeanDefinition
- Returns:
- the annotation metadata object (never null)
 
- 
getFactoryMethodMetadataDescription copied from interface:AnnotatedBeanDefinitionObtain metadata for this bean definition's factory method, if any.- Specified by:
- getFactoryMethodMetadatain interface- AnnotatedBeanDefinition
- Returns:
- the factory method metadata, or nullif none
 
 
-