org.springframework.core.type.filter

## 类 AnnotationTypeFilter

- java.lang.Object
- - org.springframework.core.type.filter.AbstractTypeHierarchyTraversingFilter
  - - org.springframework.core.type.filter.AnnotationTypeFilter

- 所有已实现的接口:
    TypeFilter

      public class AnnotationTypeFilter
      extends AbstractTypeHierarchyTraversingFilter

  A simple filter which matches classes with a given annotation, checking inherited annotations as well.

  The matching logic mirrors that of `Class.isAnnotationPresent(Class)`.

  从以下版本开始:
    2.5
  作者:
    Mark Fisher, Ramnivas Laddad, Juergen Hoeller

- - ### 字段概要

    - ### 从类继承的字段 org.springframework.core.type.filter.AbstractTypeHierarchyTraversingFilter

      `logger`

  - ### 构造器概要

    构造器
    构造器和说明
    `AnnotationTypeFilter(Class<? extends Annotation> annotationType)` Create a new AnnotationTypeFilter for the given annotation type.
    `AnnotationTypeFilter(Class<? extends Annotation> annotationType, boolean considerMetaAnnotations)` Create a new AnnotationTypeFilter for the given annotation type.
    `AnnotationTypeFilter(Class<? extends Annotation> annotationType, boolean considerMetaAnnotations, boolean considerInterfaces)` Create a new `AnnotationTypeFilter` for the given annotation type.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `Class<? extends Annotation>` | `getAnnotationType()` Return the `Annotation` that this instance is using to filter candidates.
    `protected Boolean` | `hasAnnotation(String typeName)`
    `protected Boolean` | `matchInterface(String interfaceName)` Override this to match on interface type name.
    `protected boolean` | `matchSelf(MetadataReader metadataReader)` Override this to match self characteristics alone.
    `protected Boolean` | `matchSuperClass(String superClassName)` Override this to match on super type name.

    - ### 从类继承的方法 org.springframework.core.type.filter.AbstractTypeHierarchyTraversingFilter

      `match, matchClassName`

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

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

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

    - #### AnnotationTypeFilter

          public AnnotationTypeFilter(Class<? extends Annotation> annotationType)

      Create a new AnnotationTypeFilter for the given annotation type. This filter will also match meta-annotations. To disable the meta-annotation matching, use the constructor that accepts a '`considerMetaAnnotations`' argument. The filter will not match interfaces.
      参数:
        `annotationType` - the annotation type to match

    - #### AnnotationTypeFilter

          public AnnotationTypeFilter(Class<? extends Annotation> annotationType,
                                      boolean considerMetaAnnotations)

      Create a new AnnotationTypeFilter for the given annotation type. The filter will not match interfaces.
      参数:
        `annotationType` - the annotation type to match
        `considerMetaAnnotations` - whether to also match on meta-annotations

    - #### AnnotationTypeFilter

          public AnnotationTypeFilter(Class<? extends Annotation> annotationType,
                                      boolean considerMetaAnnotations,
                                      boolean considerInterfaces)

      Create a new `AnnotationTypeFilter` for the given annotation type.
      参数:
        `annotationType` - the annotation type to match
        `considerMetaAnnotations` - whether to also match on meta-annotations
        `considerInterfaces` - whether to also match interfaces

  - ### 方法详细资料

    - #### getAnnotationType

          public final Class<? extends Annotation> getAnnotationType()

      Return the `Annotation` that this instance is using to filter candidates.
      从以下版本开始:
        5.0

    - #### matchSelf

          protected boolean matchSelf(MetadataReader metadataReader)

      从类复制的说明: `AbstractTypeHierarchyTraversingFilter`
      Override this to match self characteristics alone. Typically, the implementation will use a visitor to extract information to perform matching.
      覆盖:
        `matchSelf` 在类中 `AbstractTypeHierarchyTraversingFilter`

    - #### matchSuperClass

          @Nullable
          protected Boolean matchSuperClass(String superClassName)

      从类复制的说明: `AbstractTypeHierarchyTraversingFilter`
      Override this to match on super type name.
      覆盖:
        `matchSuperClass` 在类中 `AbstractTypeHierarchyTraversingFilter`

    - #### matchInterface

          @Nullable
          protected Boolean matchInterface(String interfaceName)

      从类复制的说明: `AbstractTypeHierarchyTraversingFilter`
      Override this to match on interface type name.
      覆盖:
        `matchInterface` 在类中 `AbstractTypeHierarchyTraversingFilter`

    - #### hasAnnotation

          @Nullable
          protected Boolean hasAnnotation(String typeName)