org.springframework.aop.support.annotation

Class AnnotationMatchingPointcut

  • java.lang.Object
    • org.springframework.aop.support.annotation.AnnotationMatchingPointcut
    • Field Summary

      • Fields inherited from interface org.springframework.aop.Pointcut

        TRUE
    • Constructor Summary

      Constructors 
      Constructor and Description
      AnnotationMatchingPointcut(java.lang.Class<? extends java.lang.annotation.Annotation> classAnnotationType)
      Create a new AnnotationMatchingPointcut for the given annotation type.
      AnnotationMatchingPointcut(java.lang.Class<? extends java.lang.annotation.Annotation> classAnnotationType, boolean checkInherited)
      Create a new AnnotationMatchingPointcut for the given annotation type.
      AnnotationMatchingPointcut(java.lang.Class<? extends java.lang.annotation.Annotation> classAnnotationType, java.lang.Class<? extends java.lang.annotation.Annotation> methodAnnotationType)
      Create a new AnnotationMatchingPointcut for the given annotation type.
      AnnotationMatchingPointcut(java.lang.Class<? extends java.lang.annotation.Annotation> classAnnotationType, java.lang.Class<? extends java.lang.annotation.Annotation> methodAnnotationType, boolean checkInherited)
      Create a new AnnotationMatchingPointcut for the given annotation type.
    • Constructor Detail

      • AnnotationMatchingPointcut

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

        public AnnotationMatchingPointcut(java.lang.Class<? extends java.lang.annotation.Annotation> classAnnotationType,
                                          boolean checkInherited)
        Create a new AnnotationMatchingPointcut for the given annotation type.
        Parameters:
        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
        See Also:
        AnnotationClassFilter.AnnotationClassFilter(Class, boolean)
      • AnnotationMatchingPointcut

        public AnnotationMatchingPointcut(@Nullable
                                          java.lang.Class<? extends java.lang.annotation.Annotation> classAnnotationType,
                                          @Nullable
                                          java.lang.Class<? extends java.lang.annotation.Annotation> methodAnnotationType)
        Create a new AnnotationMatchingPointcut for the given annotation type.
        Parameters:
        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(@Nullable
                                          java.lang.Class<? extends java.lang.annotation.Annotation> classAnnotationType,
                                          @Nullable
                                          java.lang.Class<? extends java.lang.annotation.Annotation> methodAnnotationType,
                                          boolean checkInherited)
        Create a new AnnotationMatchingPointcut for the given annotation type.
        Parameters:
        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
        Since:
        5.0
        See Also:
        AnnotationClassFilter.AnnotationClassFilter(Class, boolean), AnnotationMethodMatcher.AnnotationMethodMatcher(Class, boolean)
    • Method Detail

      • getClassFilter

        public ClassFilter getClassFilter()
        Description copied from interface: Pointcut
        Return the ClassFilter for this pointcut.
        Specified by:
        getClassFilter in interface Pointcut
        Returns:
        the ClassFilter (never null)
      • getMethodMatcher

        public MethodMatcher getMethodMatcher()
        Description copied from interface: Pointcut
        Return the MethodMatcher for this pointcut.
        Specified by:
        getMethodMatcher in interface Pointcut
        Returns:
        the MethodMatcher (never null)
      • equals

        public boolean equals(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • forClassAnnotation

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

        public static AnnotationMatchingPointcut forMethodAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
        Factory method for an AnnotationMatchingPointcut that matches for the specified annotation at the method level.
        Parameters:
        annotationType - the annotation type to look for at the method level
        Returns:
        the corresponding AnnotationMatchingPointcut