类 AnnotationMatchingPointcut

java.lang.Object
infra.aop.support.annotation.AnnotationMatchingPointcut
所有已实现的接口:
Pointcut

public class AnnotationMatchingPointcut extends Object implements Pointcut
Simple Pointcut that looks for a specific Java 5 annotation being present on a class or method.
从以下版本开始:
3.0
作者:
Juergen Hoeller, Sam Brannen, TODAY 2021/2/2 13:00
另请参阅:
  • 字段详细资料

  • 构造器详细资料

    • AnnotationMatchingPointcut

      public AnnotationMatchingPointcut(Class<? extends Annotation> classAnnotationType)
      Create a new AnnotationMatchingPointcut for the given annotation type.
      参数:
      classAnnotationType - the annotation type to look for at the class level
    • AnnotationMatchingPointcut

      public AnnotationMatchingPointcut(Class<? extends Annotation> classAnnotationType, boolean checkInherited)
      Create a new AnnotationMatchingPointcut for the given annotation type.
      参数:
      classAnnotationType - the annotation type to look for at the class level
      checkInherited - whether to also check the superclasses and interfaces as well as meta-annotations for the annotation type
      另请参阅:
    • AnnotationMatchingPointcut

      public AnnotationMatchingPointcut(Class<? extends Annotation> classAnnotationType, Class<? extends Annotation> methodAnnotationType)
      Create a new AnnotationMatchingPointcut for the given annotation types.
      参数:
      classAnnotationType - the annotation type to look for at the class level (can be null)
      methodAnnotationType - the annotation type to look for at the method level (can be null)
    • AnnotationMatchingPointcut

      public AnnotationMatchingPointcut(Class<? extends Annotation> classAnnotationType, Class<? extends Annotation> methodAnnotationType, boolean checkInherited)
      Create a new AnnotationMatchingPointcut for the given annotation types.
      参数:
      classAnnotationType - the annotation type to look for at the class level (can be null)
      methodAnnotationType - the annotation type to look for at the method level (can be null)
      checkInherited - whether to also check the superclasses and interfaces as well as meta-annotations for the annotation type
      另请参阅:
  • 方法详细资料

    • getClassFilter

      public ClassFilter getClassFilter()
      从接口复制的说明: Pointcut
      Return the ClassFilter for this pointcut.
      指定者:
      getClassFilter 在接口中 Pointcut
      返回:
      the ClassFilter (never null)
    • getMethodMatcher

      public MethodMatcher getMethodMatcher()
      从接口复制的说明: Pointcut
      Return the MethodMatcher for this pointcut.
      指定者:
      getMethodMatcher 在接口中 Pointcut
      返回:
      the MethodMatcher (never null)
    • equals

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

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

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

      public static AnnotationMatchingPointcut forClassAnnotation(Class<? extends Annotation> annotationType)
      Factory method for an AnnotationMatchingPointcut that matches for the specified annotation at the class level.
      参数:
      annotationType - the annotation type to look for at the class level
      返回:
      the corresponding AnnotationMatchingPointcut
    • forMethodAnnotation

      public static AnnotationMatchingPointcut forMethodAnnotation(Class<? extends Annotation> annotationType)
      Factory method for an AnnotationMatchingPointcut that matches for the specified annotation at the method level.
      参数:
      annotationType - the annotation type to look for at the method level
      返回:
      the corresponding AnnotationMatchingPointcut