public class AnnotationClassFilter extends java.lang.Object implements ClassFilter
AnnotationMatchingPointcut
Modifier and Type | Field and Description |
---|---|
private java.lang.Class<? extends java.lang.annotation.Annotation> |
annotationType |
private boolean |
checkInherited |
TRUE
Constructor and Description |
---|
AnnotationClassFilter(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Create a new AnnotationClassFilter for the given annotation type.
|
AnnotationClassFilter(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
boolean checkInherited)
Create a new AnnotationClassFilter for the given annotation type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
matches(java.lang.Class clazz)
Should the pointcut apply to the given interface or target class?
|
private final java.lang.Class<? extends java.lang.annotation.Annotation> annotationType
private final boolean checkInherited
public AnnotationClassFilter(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
annotationType
- the annotation type to look forpublic AnnotationClassFilter(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, boolean checkInherited)
annotationType
- the annotation type to look forcheckInherited
- whether to explicitly check the superclasses and
interfaces for the annotation type as well (even if the annotation type
is not marked as inherited itself)public boolean matches(java.lang.Class clazz)
ClassFilter
matches
in interface ClassFilter
clazz
- the candidate target class