public class AnnotationMethodMatcher extends StaticMethodMatcher
AnnotationMatchingPointcut
TRUE
Constructor and Description |
---|
AnnotationMethodMatcher(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Create a new AnnotationClassFilter for the given annotation type.
|
AnnotationMethodMatcher(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 |
equals(java.lang.Object other) |
int |
hashCode() |
boolean |
matches(java.lang.reflect.Method method,
java.lang.Class<?> targetClass)
Perform static checking whether the given method matches.
|
java.lang.String |
toString() |
isRuntime, matches
public AnnotationMethodMatcher(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
annotationType
- the annotation type to look forpublic AnnotationMethodMatcher(java.lang.Class<? extends java.lang.annotation.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 AnnotationUtils.findAnnotation(Method, Class)
semantics instead of standard Java AccessibleObject.isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation>)
)public boolean matches(java.lang.reflect.Method method, @Nullable java.lang.Class<?> targetClass)
MethodMatcher
false
or if the MethodMatcher.isRuntime()
method
returns false
, no runtime check (i.e. no.
MethodMatcher.matches(java.lang.reflect.Method, Class, Object[])
call) will be made.method
- the candidate methodtargetClass
- the target class (may be null
, in which case
the candidate class must be taken to be the method's declaring class)public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object