public class AnnotatedGenericBeanDefinition extends GenericBeanDefinition implements AnnotatedBeanDefinition
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
org.springframework.context.annotation.ScannedGenericBeanDefinition,
which also implements the AnnotatedBeanDefinition interface).
AnnotatedBeanDefinition.getMetadata(),
StandardAnnotationMetadata,
序列化表格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_DEFAULTROLE_APPLICATION, ROLE_INFRASTRUCTURE, ROLE_SUPPORT, SCOPE_PROTOTYPE, SCOPE_SINGLETON| 构造器和说明 |
|---|
AnnotatedGenericBeanDefinition(org.springframework.core.type.AnnotationMetadata metadata)
Create a new AnnotatedGenericBeanDefinition for the given annotation metadata,
allowing for ASM-based processing and avoidance of early loading of the bean class.
|
AnnotatedGenericBeanDefinition(org.springframework.core.type.AnnotationMetadata metadata,
org.springframework.core.type.MethodMetadata factoryMethodMetadata)
Create a new AnnotatedGenericBeanDefinition for the given annotation metadata,
based on an annotated class and a factory method on that class.
|
AnnotatedGenericBeanDefinition(Class<?> beanClass)
Create a new AnnotatedGenericBeanDefinition for the given bean class.
|
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.core.type.MethodMetadata |
getFactoryMethodMetadata()
Obtain metadata for this bean definition's factory method, if any.
|
org.springframework.core.type.AnnotationMetadata |
getMetadata()
Obtain the annotation metadata (as well as basic class metadata)
for this bean definition's bean class.
|
cloneBeanDefinition, equals, getParentName, setParentName, toStringaddQualifier, applyDefaults, clone, copyQualifiersFrom, getAutowireMode, getBeanClass, getBeanClassName, getConstructorArgumentValues, getDependencyCheck, getDependsOn, getDescription, getDestroyMethodName, getFactoryBeanName, getFactoryMethodName, getInitMethodName, getInstanceSupplier, getMethodOverrides, getOriginatingBeanDefinition, getPropertyValues, getQualifier, getQualifiers, 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, validateaddMetadataAttribute, getAttribute, getMetadataAttribute, getSource, removeAttribute, setAttribute, setSourceattributeNames, copyAttributesFrom, hasAttributegetBeanClassName, getConstructorArgumentValues, getDependsOn, getDescription, getFactoryBeanName, getFactoryMethodName, getOriginatingBeanDefinition, getParentName, getPropertyValues, getResourceDescription, getRole, getScope, hasConstructorArgumentValues, hasPropertyValues, isAbstract, isAutowireCandidate, isLazyInit, isPrimary, isPrototype, isSingleton, setAutowireCandidate, setBeanClassName, setDependsOn, setFactoryBeanName, setFactoryMethodName, setLazyInit, setParentName, setPrimary, setScopeattributeNames, getAttribute, hasAttribute, removeAttribute, setAttributegetSourcepublic AnnotatedGenericBeanDefinition(Class<?> beanClass)
beanClass - the loaded bean classpublic AnnotatedGenericBeanDefinition(org.springframework.core.type.AnnotationMetadata metadata)
ScannedGenericBeanDefinition, however the semantics of the latter indicate that a
bean was discovered specifically via component-scanning as opposed to other means.metadata - the annotation metadata for the bean class in questionpublic AnnotatedGenericBeanDefinition(org.springframework.core.type.AnnotationMetadata metadata,
org.springframework.core.type.MethodMetadata factoryMethodMetadata)
metadata - the annotation metadata for the bean class in questionfactoryMethodMetadata - metadata for the selected factory methodpublic final org.springframework.core.type.AnnotationMetadata getMetadata()
AnnotatedBeanDefinitiongetMetadata 在接口中 AnnotatedBeanDefinitionnull)@Nullable public final org.springframework.core.type.MethodMetadata getFactoryMethodMetadata()
AnnotatedBeanDefinitiongetFactoryMethodMetadata 在接口中 AnnotatedBeanDefinitionnull if none