public class AnnotationClassFilter extends Object implements ClassFilter
AnnotationMatchingPointcut
TRUE
Constructor and Description |
---|
AnnotationClassFilter(Class<? extends Annotation> annotationType)
Create a new AnnotationClassFilter for the given annotation type.
|
AnnotationClassFilter(Class<? extends Annotation> annotationType,
boolean checkInherited)
Create a new AnnotationClassFilter for the given annotation type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
int |
hashCode() |
boolean |
matches(Class<?> clazz)
Should the pointcut apply to the given interface or target class?
|
String |
toString() |
public AnnotationClassFilter(Class<? extends Annotation> annotationType)
annotationType
- the annotation type to look forpublic AnnotationClassFilter(Class<? extends Annotation> annotationType, boolean checkInherited)
annotationType
- the annotation type to look forcheckInherited
- whether to also check the superclasses and
interfaces as well as meta-annotations for the annotation type
(i.e. whether to use AnnotatedElementUtils.hasAnnotation(java.lang.reflect.AnnotatedElement, java.lang.Class<? extends java.lang.annotation.Annotation>)
semantics instead of standard Java Class.isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation>)
)public boolean matches(Class<?> clazz)
ClassFilter
matches
in interface ClassFilter
clazz
- the candidate target class