org.springframework.core.type.filter

## 类 AbstractTypeHierarchyTraversingFilter

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

- 所有已实现的接口:
    TypeFilter
  直接已知子类:
    AnnotationTypeFilter, AssignableTypeFilter

      public abstract class AbstractTypeHierarchyTraversingFilter
      extends Object
      implements TypeFilter

  Type filter that is aware of traversing over hierarchy.

  This filter is useful when matching needs to be made based on potentially the whole class/interface hierarchy. The algorithm employed uses a succeed-fast strategy: if at any time a match is declared, no further processing is carried out.

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

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `protected Log` | `logger`

  - ### 构造器概要

    构造器
    限定符 | 构造器和说明
    --- | ---
    `protected` | `AbstractTypeHierarchyTraversingFilter(boolean considerInherited, boolean considerInterfaces)`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | `match(MetadataReader metadataReader, MetadataReaderFactory metadataReaderFactory)` Determine whether this filter matches for the class described by the given metadata.
    `protected boolean` | `matchClassName(String className)` Override this to match on type name.
    `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.

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

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

- - ### 字段详细资料

    - #### logger

          protected final Log logger

  - ### 构造器详细资料

    - #### AbstractTypeHierarchyTraversingFilter

          protected AbstractTypeHierarchyTraversingFilter(boolean considerInherited,
                                                          boolean considerInterfaces)

  - ### 方法详细资料

    - #### match

          public boolean match(MetadataReader metadataReader,
                               MetadataReaderFactory metadataReaderFactory)
                        throws IOException

      从接口复制的说明: `TypeFilter`
      Determine whether this filter matches for the class described by the given metadata.
      指定者:
        `match` 在接口中 `TypeFilter`
      参数:
        `metadataReader` - the metadata reader for the target class
        `metadataReaderFactory` - a factory for obtaining metadata readers for other classes (such as superclasses and interfaces)
      返回:
        whether this filter matches
      抛出:
        `IOException` - in case of I/O failure when reading metadata

    - #### matchSelf

          protected boolean matchSelf(MetadataReader metadataReader)

      Override this to match self characteristics alone. Typically, the implementation will use a visitor to extract information to perform matching.

    - #### matchClassName

          protected boolean matchClassName(String className)

      Override this to match on type name.

    - #### matchSuperClass

          @Nullable
          protected Boolean matchSuperClass(String superClassName)

      Override this to match on super type name.

    - #### matchInterface

          @Nullable
          protected Boolean matchInterface(String interfaceName)

      Override this to match on interface type name.