org.springframework.beans.factory.annotation

## 类 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

- 所有已实现的接口:
    Serializable, Cloneable, BeanMetadataElement, AnnotatedBeanDefinition, BeanDefinition, org.springframework.core.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 `org.springframework.context.annotation.ScannedGenericBeanDefinition`, which also implements the AnnotatedBeanDefinition interface).

  从以下版本开始:
    2.5
  作者:
    Juergen Hoeller, Chris Beams
  另请参阅:
    `AnnotatedBeanDefinition.getMetadata()`, `StandardAnnotationMetadata`, 序列化表格

- - ### 字段概要

    - ### 从类继承的字段 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`

  - ### 构造器概要

    构造器
    构造器和说明
    `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.

    - ### 从类继承的方法 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, 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, validate`

    - ### 从类继承的方法 org.springframework.beans.BeanMetadataAttributeAccessor

      `addMetadataAttribute, getAttribute, getMetadataAttribute, getSource, removeAttribute, setAttribute, setSource`

    - ### 从类继承的方法 org.springframework.core.AttributeAccessorSupport

      `attributeNames, copyAttributesFrom, hasAttribute`

    - ### 从类继承的方法 java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### 从接口继承的方法 org.springframework.beans.factory.config.BeanDefinition

      `getBeanClassName, 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, setScope`

    - ### 从接口继承的方法 org.springframework.core.AttributeAccessor

      `attributeNames, getAttribute, hasAttribute, removeAttribute, setAttribute`

    - ### 从接口继承的方法 org.springframework.beans.BeanMetadataElement

      `getSource`

- - ### 构造器详细资料

    - #### AnnotatedGenericBeanDefinition

          public AnnotatedGenericBeanDefinition(Class<?> beanClass)

      Create a new AnnotatedGenericBeanDefinition for the given bean class.
      参数:
        `beanClass` - the loaded bean class

    - #### AnnotatedGenericBeanDefinition

          public 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. Note that this constructor is functionally equivalent to `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 question
      从以下版本开始:
        3.1.1

    - #### AnnotatedGenericBeanDefinition

          public 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.
      参数:
        `metadata` - the annotation metadata for the bean class in question
        `factoryMethodMetadata` - metadata for the selected factory method
      从以下版本开始:
        4.1.1

  - ### 方法详细资料

    - #### getMetadata

          public final org.springframework.core.type.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

          @Nullable
          public final org.springframework.core.type.MethodMetadata getFactoryMethodMetadata()

      从接口复制的说明: `AnnotatedBeanDefinition`
      Obtain metadata for this bean definition's factory method, if any.
      指定者:
        `getFactoryMethodMetadata` 在接口中 `AnnotatedBeanDefinition`
      返回:
        the factory method metadata, or `null` if none