类 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
- 所有已实现的接口:
Serializable
,Cloneable
,BeanMetadataElement
,AnnotatedBeanDefinition
,BeanDefinition
,AttributeAccessor
public class ScannedGenericBeanDefinition extends GenericBeanDefinition implements AnnotatedBeanDefinition
Extension of theGenericBeanDefinition
class, based on an ASM ClassReader, with support for annotation metadata exposed through theAnnotatedBeanDefinition
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 toAnnotatedGenericBeanDefinition(AnnotationMetadata)
but distinguishes by type beans that have been scanned vs those that have been otherwise registered or detected by other means.- 从以下版本开始:
- 2.5
- 作者:
- Juergen Hoeller, Chris Beams
- 另请参阅:
getMetadata()
,AbstractBeanDefinition.getBeanClassName()
,MetadataReaderFactory
,AnnotatedGenericBeanDefinition
, 序列化表格
字段概要
从类继承的字段 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
从接口继承的字段 org.springframework.beans.factory.config.BeanDefinition
ROLE_APPLICATION, ROLE_INFRASTRUCTURE, ROLE_SUPPORT, SCOPE_PROTOTYPE, SCOPE_SINGLETON
构造器概要
构造器 构造器 说明 ScannedGenericBeanDefinition(MetadataReader metadataReader)
Create a new ScannedGenericBeanDefinition for the class that the given MetadataReader describes.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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.从类继承的方法 org.springframework.beans.factory.support.GenericBeanDefinition
cloneBeanDefinition, equals, getParentName, setParentName, toString
从类继承的方法 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, 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, setSynthetic, validate
从类继承的方法 org.springframework.beans.BeanMetadataAttributeAccessor
addMetadataAttribute, getAttribute, getMetadataAttribute, getSource, removeAttribute, setAttribute, setSource
从类继承的方法 org.springframework.core.AttributeAccessorSupport
attributeNames, copyAttributesFrom, hasAttribute
从接口继承的方法 org.springframework.core.AttributeAccessor
attributeNames, getAttribute, hasAttribute, removeAttribute, setAttribute
从接口继承的方法 org.springframework.beans.factory.config.BeanDefinition
getBeanClassName, getConstructorArgumentValues, getDependsOn, getDescription, getFactoryBeanName, getFactoryMethodName, getOriginatingBeanDefinition, getParentName, getPropertyValues, getResourceDescription, getRole, getScope, isAbstract, isAutowireCandidate, isLazyInit, isPrimary, isPrototype, isSingleton, setAutowireCandidate, setBeanClassName, setDependsOn, setFactoryBeanName, setFactoryMethodName, setLazyInit, setParentName, setPrimary, setScope
从接口继承的方法 org.springframework.beans.BeanMetadataElement
getSource
构造器详细资料
ScannedGenericBeanDefinition
public ScannedGenericBeanDefinition(MetadataReader metadataReader)
Create a new ScannedGenericBeanDefinition for the class that the given MetadataReader describes.- 参数:
metadataReader
- the MetadataReader for the scanned target class
方法详细资料
getMetadata
public final AnnotationMetadata getMetadata()
从接口复制的说明:AnnotatedBeanDefinition
Obtain the annotation metadata (as well as basic class metadata) for this bean definition's bean class.- 指定者:
getMetadata
在接口中AnnotatedBeanDefinition
- 返回:
- the annotation metadata object (never
null
)
getFactoryMethodMetadata
public MethodMetadata getFactoryMethodMetadata()
从接口复制的说明:AnnotatedBeanDefinition
Obtain metadata for this bean definition's factory method, if any.- 指定者:
getFactoryMethodMetadata
在接口中AnnotatedBeanDefinition
- 返回:
- the factory method metadata, or
null
if none