public class ScannedGenericBeanDefinition extends GenericBeanDefinition implements AnnotatedBeanDefinition
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.
getMetadata()
,
AbstractBeanDefinition.getBeanClassName()
,
MetadataReaderFactory
,
AnnotatedGenericBeanDefinition
,
Serialized FormAUTOWIRE_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
ROLE_APPLICATION, ROLE_INFRASTRUCTURE, ROLE_SUPPORT, SCOPE_PROTOTYPE, SCOPE_SINGLETON
Constructor and Description |
---|
ScannedGenericBeanDefinition(MetadataReader metadataReader)
Create a new ScannedGenericBeanDefinition for the class that the
given MetadataReader describes.
|
Modifier and Type | Method and Description |
---|---|
MethodMetadata |
getFactoryMethodMetadata()
Obtain metadata for this bean definition's factory method, if any.
|
AnnotationMetadata |
getMetadata()
Obtain the annotation metadata (as well as basic class metadata)
for this bean definition's bean class.
|
cloneBeanDefinition, equals, getParentName, setParentName, toString
addQualifier, applyDefaults, clone, copyQualifiersFrom, getAutowireMode, getBeanClass, getBeanClassName, getConstructorArgumentValues, getDependencyCheck, getDependsOn, getDescription, getDestroyMethodName, getFactoryBeanName, getFactoryMethodName, getInitMethodName, getInstanceSupplier, getLazyInit, getMethodOverrides, getOriginatingBeanDefinition, getPropertyValues, getQualifier, getQualifiers, getResolvableType, getResolvedAutowireMode, getResource, getResourceDescription, getRole, getScope, hasBeanClass, hasConstructorArgumentValues, hashCode, hasMethodOverrides, hasPropertyValues, hasQualifier, isAbstract, isAutowireCandidate, isEnforceDestroyMethod, isEnforceInitMethod, isLazyInit, isLenientConstructorResolution, isNonPublicAccessAllowed, isPrimary, isPrototype, isSingleton, isSynthetic, overrideFrom, prepareMethodOverride, prepareMethodOverrides, resolveBeanClass, setAbstract, setAutowireCandidate, setAutowireMode, setBeanClass, setBeanClassName, setConstructorArgumentValues, setDependencyCheck, setDependsOn, setDescription, setDestroyMethodName, setEnforceDestroyMethod, setEnforceInitMethod, setFactoryBeanName, setFactoryMethodName, setInitMethodName, setInstanceSupplier, setLazyInit, setLenientConstructorResolution, setMethodOverrides, setNonPublicAccessAllowed, setOriginatingBeanDefinition, setPrimary, setPropertyValues, setResource, setResourceDescription, setRole, setScope, setSynthetic, validate
addMetadataAttribute, getAttribute, getMetadataAttribute, getSource, removeAttribute, setAttribute, setSource
attributeNames, computeAttribute, copyAttributesFrom, hasAttribute
finalize, getClass, notify, notifyAll, wait, wait, wait
getBeanClassName, getConstructorArgumentValues, getDependsOn, getDescription, getDestroyMethodName, getFactoryBeanName, getFactoryMethodName, getInitMethodName, getOriginatingBeanDefinition, getParentName, getPropertyValues, getResolvableType, getResourceDescription, getRole, getScope, hasConstructorArgumentValues, hasPropertyValues, isAbstract, isAutowireCandidate, isLazyInit, isPrimary, isPrototype, isSingleton, setAutowireCandidate, setBeanClassName, setDependsOn, setDescription, setDestroyMethodName, setFactoryBeanName, setFactoryMethodName, setInitMethodName, setLazyInit, setParentName, setPrimary, setRole, setScope
attributeNames, computeAttribute, getAttribute, hasAttribute, removeAttribute, setAttribute
getSource
public ScannedGenericBeanDefinition(MetadataReader metadataReader)
metadataReader
- the MetadataReader for the scanned target classpublic final AnnotationMetadata getMetadata()
AnnotatedBeanDefinition
getMetadata
in interface AnnotatedBeanDefinition
null
)@Nullable public MethodMetadata getFactoryMethodMetadata()
AnnotatedBeanDefinition
getFactoryMethodMetadata
in interface AnnotatedBeanDefinition
null
if none