public class AnnotationMatchingPointcut extends Object implements Pointcut
AnnotationClassFilter
,
AnnotationMethodMatcher
Constructor and Description |
---|
AnnotationMatchingPointcut(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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
static AnnotationMatchingPointcut |
forClassAnnotation(Class<? extends Annotation> annotationType)
Factory method for an AnnotationMatchingPointcut that matches
for the specified annotation at the class level.
|
static AnnotationMatchingPointcut |
forMethodAnnotation(Class<? extends Annotation> annotationType)
Factory method for an AnnotationMatchingPointcut that matches
for the specified annotation at the method level.
|
ClassFilter |
getClassFilter()
Return the ClassFilter for this pointcut.
|
MethodMatcher |
getMethodMatcher()
Return the MethodMatcher for this pointcut.
|
int |
hashCode() |
String |
toString() |
public AnnotationMatchingPointcut(Class<? extends Annotation> classAnnotationType)
classAnnotationType
- the annotation type to look for at the class levelpublic AnnotationMatchingPointcut(Class<? extends Annotation> classAnnotationType, boolean checkInherited)
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 typeAnnotationClassFilter.AnnotationClassFilter(Class, boolean)
public AnnotationMatchingPointcut(Class<? extends Annotation> classAnnotationType, Class<? extends Annotation> methodAnnotationType)
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
)public ClassFilter getClassFilter()
Pointcut
getClassFilter
in interface Pointcut
null
)public MethodMatcher getMethodMatcher()
Pointcut
getMethodMatcher
in interface Pointcut
null
)public static AnnotationMatchingPointcut forClassAnnotation(Class<? extends Annotation> annotationType)
annotationType
- the annotation type to look for at the class levelpublic static AnnotationMatchingPointcut forMethodAnnotation(Class<? extends Annotation> annotationType)
annotationType
- the annotation type to look for at the method level