类 AnnotationMethodMatcher

java.lang.Object
infra.core.OrderedSupport
infra.aop.support.StaticMethodMatcher
infra.aop.support.annotation.AnnotationMethodMatcher
所有已实现的接口:
MethodMatcher, infra.core.Ordered

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).
从以下版本开始:
3.0
作者:
Juergen Hoeller, Sam Brannen, TODAY 2021/2/2 13:00
另请参阅:
  • 字段详细资料

    • annotationType

      private final Class<? extends Annotation> annotationType
    • checkInherited

      private final boolean checkInherited
  • 构造器详细资料

    • 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 AnnotatedElementUtils.hasAnnotation(AnnotatedElement, Class) semantics instead of standard Java AccessibleObject.isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation>))
  • 方法详细资料

    • matches

      public boolean matches(Method method, Class<?> targetClass)
      从接口复制的说明: MethodMatcher
      Checking whether the given method matches.
      参数:
      method - the candidate method
      targetClass - the target class
      返回:
      whether or not this method matches on application startup.
    • matchesMethod

      private boolean matchesMethod(Method method)
    • equals

      public boolean equals(Object other)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object