org.springframework.aop.support.annotation

## 类 AnnotationMethodMatcher

- java.lang.Object
- - org.springframework.aop.support.StaticMethodMatcher
  - - org.springframework.aop.support.annotation.AnnotationMethodMatcher

- 所有已实现的接口:
    MethodMatcher

      public class AnnotationMethodMatcher
      extends StaticMethodMatcher

  Simple MethodMatcher that looks for a specific Java 5 annotation being present on a method (checking both the method on the invoked interface, if any, and the corresponding method on the target class).
  从以下版本开始:
    2.0
  作者:
    Juergen Hoeller
  另请参阅:
    `AnnotationMatchingPointcut`

- - ### 字段概要

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

      `TRUE`

  - ### 构造器概要

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

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | `equals(Object other)`
    `int` | `hashCode()`
    `boolean` | `matches(Method method, Class<?> targetClass)` Perform static checking whether the given method matches.
    `String` | `toString()`

    - ### 从类继承的方法 org.springframework.aop.support.StaticMethodMatcher

      `isRuntime, matches`

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

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

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

    - #### AnnotationMethodMatcher

          public AnnotationMethodMatcher(Class<? extends Annotation> annotationType)

      Create a new AnnotationClassFilter for the given annotation type.
      参数:
        `annotationType` - the annotation type to look for

    - #### AnnotationMethodMatcher

          public AnnotationMethodMatcher(Class<? extends Annotation> annotationType,
                                         boolean checkInherited)

      Create a new AnnotationClassFilter for the given annotation type.
      参数:
        `annotationType` - the annotation type to look for
        `checkInherited` - whether to also check the superclasses and interfaces as well as meta-annotations for the annotation type (i.e. whether to use `AnnotationUtils.findAnnotation(Method, Class)` semantics instead of standard Java `AccessibleObject.isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation>)`)
      从以下版本开始:
        5.0

  - ### 方法详细资料

    - #### matches

          public boolean matches(Method method,
                                 @Nullable
                                 Class<?> targetClass)

      从接口复制的说明: `MethodMatcher`
      Perform static checking whether the given method matches.

      If this returns `false` or if the `MethodMatcher.isRuntime()` method returns `false`, no runtime check (i.e. no `MethodMatcher.matches(java.lang.reflect.Method, Class, Object[])` call) will be made.

      参数:
        `method` - the candidate method
        `targetClass` - the target class (may be `null`, in which case the candidate class must be taken to be the method's declaring class)
      返回:
        whether or not this method matches statically

    - #### equals

          public boolean equals(Object other)

      覆盖:
        `equals` 在类中 `Object`

    - #### hashCode

          public int hashCode()

      覆盖:
        `hashCode` 在类中 `Object`

    - #### toString

          public String toString()

      覆盖:
        `toString` 在类中 `Object`