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 SummaryConstructorsConstructorDescriptionAnnotationMatchingPointcut(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 SummaryModifier 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- 
AnnotationMatchingPointcutCreate a new AnnotationMatchingPointcut for the given annotation type.- Parameters:
- classAnnotationType- the annotation type to look for at the class level
 
- 
AnnotationMatchingPointcutpublic 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 level
- checkInherited- whether to also check the superclasses and interfaces as well as meta-annotations for the annotation type
- See Also:
 
- 
AnnotationMatchingPointcutpublic 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 be- null)
- methodAnnotationType- the annotation type to look for at the method level (can be- null)
 
- 
AnnotationMatchingPointcutpublic 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 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:
 
 
- 
- 
Method Details- 
getClassFilterDescription copied from interface:PointcutReturn the ClassFilter for this pointcut.- Specified by:
- getClassFilterin interface- Pointcut
- Returns:
- the ClassFilter (never null)
 
- 
getMethodMatcherDescription copied from interface:PointcutReturn the MethodMatcher for this pointcut.- Specified by:
- getMethodMatcherin interface- Pointcut
- Returns:
- the MethodMatcher (never null)
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
- 
forClassAnnotationpublic 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
 
- 
forMethodAnnotationpublic 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
 
 
-