org.springframework.aop.aspectj

## 类 TypePatternClassFilter

- java.lang.Object
- - org.springframework.aop.aspectj.TypePatternClassFilter

- 所有已实现的接口:
    ClassFilter

      public class TypePatternClassFilter
      extends Object
      implements ClassFilter

  Spring AOP `ClassFilter` implementation using AspectJ type matching.
  从以下版本开始:
    2.0
  作者:
    Rod Johnson, Juergen Hoeller

- - ### 字段概要

    - ### 从接口继承的字段 org.springframework.aop.ClassFilter

      `TRUE`

  - ### 构造器概要

    构造器
    构造器和说明
    `TypePatternClassFilter()` Creates a new instance of the `TypePatternClassFilter` class.
    `TypePatternClassFilter(String typePattern)` Create a fully configured `TypePatternClassFilter` using the given type pattern.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `String` | `getTypePattern()` Return the AspectJ type pattern to match.
    `boolean` | `matches(Class<?> clazz)` Should the pointcut apply to the given interface or target class?
    `void` | `setTypePattern(String typePattern)` Set the AspectJ type pattern to match.

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

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

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

    - #### TypePatternClassFilter

          public TypePatternClassFilter()

      Creates a new instance of the `TypePatternClassFilter` class.

      This is the JavaBean constructor; be sure to set the `typePattern` property, else a no doubt fatal `IllegalStateException` will be thrown when the `matches(Class)` method is first invoked.

    - #### TypePatternClassFilter

          public TypePatternClassFilter(String typePattern)

      Create a fully configured `TypePatternClassFilter` using the given type pattern.
      参数:
        `typePattern` - the type pattern that AspectJ weaver should parse

  - ### 方法详细资料

    - #### setTypePattern

          public void setTypePattern(String typePattern)

      Set the AspectJ type pattern to match.

      Examples include: `org.springframework.beans.*` This will match any class or interface in the given package. `org.springframework.beans.ITestBean+` This will match the `ITestBean` interface and any class that implements it.

      These conventions are established by AspectJ, not Spring AOP.

      参数:
        `typePattern` - the type pattern that AspectJ weaver should parse

    - #### getTypePattern

          public String getTypePattern()

      Return the AspectJ type pattern to match.

    - #### matches

          public boolean matches(Class<?> clazz)

      Should the pointcut apply to the given interface or target class?
      指定者:
        `matches` 在接口中 `ClassFilter`
      参数:
        `clazz` - candidate target class
      返回:
        whether the advice should apply to this candidate target class
      抛出:
        `IllegalStateException` - if no `setTypePattern(String)` has been set