Class ScannedGenericBeanDefinition
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.context.annotation.ScannedGenericBeanDefinition
- All Implemented Interfaces:
- Serializable, Cloneable, BeanMetadataElement, AnnotatedBeanDefinition, BeanDefinition, AttributeAccessor
public class ScannedGenericBeanDefinition
extends GenericBeanDefinition
implements AnnotatedBeanDefinition
Extension of the 
GenericBeanDefinition
class, based on an ASM ClassReader, with support for annotation metadata exposed
through the AnnotatedBeanDefinition interface.
This class does not load the bean Class early.
It rather retrieves all relevant metadata from the ".class" file itself,
parsed with the ASM ClassReader. It is functionally equivalent to
AnnotatedGenericBeanDefinition(AnnotationMetadata)
but distinguishes by type beans that have been scanned vs those that have
been otherwise registered or detected by other means.
- Since:
- 2.5
- Author:
- Juergen Hoeller, Chris Beams
- See Also:
- 
Field SummaryFields inherited from class 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 BeanDefinitionROLE_APPLICATION, ROLE_INFRASTRUCTURE, ROLE_SUPPORT, SCOPE_PROTOTYPE, SCOPE_SINGLETON
- 
Constructor SummaryConstructorsConstructorDescriptionScannedGenericBeanDefinition(MetadataReader metadataReader) Create a new ScannedGenericBeanDefinition for the class that the given MetadataReader describes.
- 
Method SummaryModifier and TypeMethodDescriptionObtain 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 GenericBeanDefinitioncloneBeanDefinition, equals, getParentName, setParentName, toStringMethods inherited from class 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 BeanMetadataAttributeAccessoraddMetadataAttribute, getAttribute, getMetadataAttribute, getSource, removeAttribute, setAttribute, setSourceMethods inherited from class AttributeAccessorSupportattributeNames, computeAttribute, copyAttributesFrom, hasAttributeMethods inherited from interface AttributeAccessorattributeNames, computeAttribute, getAttribute, hasAttribute, removeAttribute, setAttributeMethods inherited from interface 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 BeanMetadataElementgetSource
- 
Constructor Details- 
ScannedGenericBeanDefinitionCreate a new ScannedGenericBeanDefinition for the class that the given MetadataReader describes.- Parameters:
- metadataReader- the MetadataReader for the scanned target class
 
 
- 
- 
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
 
 
-