Class AnnotationMatchingPointcut
java.lang.Object
org.springframework.aop.support.annotation.AnnotationMatchingPointcut
- All Implemented Interfaces:
 Pointcut
- Since:
 - 2.0
 - Author:
 - Juergen Hoeller, Sam Brannen
 - See Also:
 
- 
Field Summary
 - 
Constructor Summary
ConstructorsConstructorDescriptionAnnotationMatchingPointcut(Class<? extends Annotation> classAnnotationType) Create a new AnnotationMatchingPointcut for the given annotation type.AnnotationMatchingPointcut(Class<? extends Annotation> classAnnotationType, boolean checkInherited) Create a new AnnotationMatchingPointcut for the given annotation type.AnnotationMatchingPointcut(Class<? extends Annotation> classAnnotationType, Class<? extends Annotation> methodAnnotationType) Create a new AnnotationMatchingPointcut for the given annotation types.AnnotationMatchingPointcut(Class<? extends Annotation> classAnnotationType, Class<? extends Annotation> methodAnnotationType, boolean checkInherited) Create a new AnnotationMatchingPointcut for the given annotation types. - 
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic AnnotationMatchingPointcutforClassAnnotation(Class<? extends Annotation> annotationType) Factory method for an AnnotationMatchingPointcut that matches for the specified annotation at the class level.static AnnotationMatchingPointcutforMethodAnnotation(Class<? extends Annotation> annotationType) Factory method for an AnnotationMatchingPointcut that matches for the specified annotation at the method level.Return the ClassFilter for this pointcut.Return the MethodMatcher for this pointcut.inthashCode()toString() 
- 
Constructor Details
- 
AnnotationMatchingPointcut
Create a new AnnotationMatchingPointcut for the given annotation type.- Parameters:
 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.- Parameters:
 classAnnotationType- the annotation type to look for at the class levelcheckInherited- whether to also check the superclasses and interfaces as well as meta-annotations for the annotation type- See Also:
 
 - 
AnnotationMatchingPointcut
public AnnotationMatchingPointcut(@Nullable Class<? extends Annotation> classAnnotationType, @Nullable Class<? extends Annotation> methodAnnotationType) Create a new AnnotationMatchingPointcut for the given annotation types.- Parameters:
 classAnnotationType- the annotation type to look for at the class level (can benull)methodAnnotationType- the annotation type to look for at the method level (can benull)
 - 
AnnotationMatchingPointcut
public AnnotationMatchingPointcut(@Nullable Class<? extends Annotation> classAnnotationType, @Nullable Class<? extends Annotation> methodAnnotationType, boolean checkInherited) Create a new AnnotationMatchingPointcut for the given annotation types.- Parameters:
 classAnnotationType- the annotation type to look for at the class level (can benull)methodAnnotationType- the annotation type to look for at the method level (can benull)checkInherited- whether to also check the superclasses and interfaces as well as meta-annotations for the annotation type- Since:
 - 5.0
 - See Also:
 
 
 - 
 - 
Method Details
- 
getClassFilter
Description copied from interface:PointcutReturn the ClassFilter for this pointcut.- Specified by:
 getClassFilterin interfacePointcut- Returns:
 - the ClassFilter (never 
null) 
 - 
getMethodMatcher
Description copied from interface:PointcutReturn the MethodMatcher for this pointcut.- Specified by:
 getMethodMatcherin interfacePointcut- Returns:
 - the MethodMatcher (never 
null) 
 - 
equals
 - 
hashCode
public int hashCode() - 
toString
 - 
forClassAnnotation
public static AnnotationMatchingPointcut forClassAnnotation(Class<? extends 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(Class<? extends 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
 
 
 -