org.springframework.context.annotation

## 类 AnnotationScopeMetadataResolver

- java.lang.Object
- - org.springframework.context.annotation.AnnotationScopeMetadataResolver

- 所有已实现的接口:
    ScopeMetadataResolver

      public class AnnotationScopeMetadataResolver
      extends Object
      implements ScopeMetadataResolver

  A `ScopeMetadataResolver` implementation that by default checks for the presence of Spring's `@Scope` annotation on the bean class.

  The exact type of annotation that is checked for is configurable via `setScopeAnnotationType(Class)`.

  从以下版本开始:
    2.5
  作者:
    Mark Fisher, Juergen Hoeller, Sam Brannen
  另请参阅:
    `Scope`

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `protected Class<? extends Annotation>` | `scopeAnnotationType`

  - ### 构造器概要

    构造器
    构造器和说明
    `AnnotationScopeMetadataResolver()` Construct a new `AnnotationScopeMetadataResolver`.
    `AnnotationScopeMetadataResolver(ScopedProxyMode defaultProxyMode)` Construct a new `AnnotationScopeMetadataResolver` using the supplied default `ScopedProxyMode`.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `ScopeMetadata` | `resolveScopeMetadata(org.springframework.beans.factory.config.BeanDefinition definition)` Resolve the `ScopeMetadata` appropriate to the supplied bean `definition`.
    `void` | `setScopeAnnotationType(Class<? extends Annotation> scopeAnnotationType)` Set the type of annotation that is checked for by this `AnnotationScopeMetadataResolver`.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 字段详细资料

    - #### scopeAnnotationType

          protected Class<? extends Annotation> scopeAnnotationType

  - ### 构造器详细资料

    - #### AnnotationScopeMetadataResolver

          public AnnotationScopeMetadataResolver()

      Construct a new `AnnotationScopeMetadataResolver`.
      另请参阅:
        `AnnotationScopeMetadataResolver(ScopedProxyMode)`, `ScopedProxyMode.NO`

    - #### AnnotationScopeMetadataResolver

          public AnnotationScopeMetadataResolver(ScopedProxyMode defaultProxyMode)

      Construct a new `AnnotationScopeMetadataResolver` using the supplied default `ScopedProxyMode`.
      参数:
        `defaultProxyMode` - the default scoped-proxy mode

  - ### 方法详细资料

    - #### setScopeAnnotationType

          public void setScopeAnnotationType(Class<? extends Annotation> scopeAnnotationType)

      Set the type of annotation that is checked for by this `AnnotationScopeMetadataResolver`.
      参数:
        `scopeAnnotationType` - the target annotation type

    - #### resolveScopeMetadata

          public ScopeMetadata resolveScopeMetadata(org.springframework.beans.factory.config.BeanDefinition definition)

      从接口复制的说明: `ScopeMetadataResolver`
      Resolve the `ScopeMetadata` appropriate to the supplied bean `definition`.

      Implementations can of course use any strategy they like to determine the scope metadata, but some implementations that spring immediately to mind might be to use source level annotations present on `the class` of the supplied `definition`, or to use metadata present in the `AttributeAccessor.attributeNames()` of the supplied `definition`.

      指定者:
        `resolveScopeMetadata` 在接口中 `ScopeMetadataResolver`
      参数:
        `definition` - the target bean definition
      返回:
        the relevant scope metadata; never `null`