Class AnnotationClassFilter
java.lang.Object
org.springframework.aop.support.annotation.AnnotationClassFilter
- All Implemented Interfaces:
ClassFilter
Simple ClassFilter that looks for a specific annotation being present on a class.
- Since:
- 2.0
- Author:
- Juergen Hoeller
- See Also:
-
Field Summary
Fields inherited from interface org.springframework.aop.ClassFilter
TRUE
-
Constructor Summary
ConstructorDescriptionAnnotationClassFilter
(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. -
Method Summary
-
Constructor Details
-
AnnotationClassFilter
Create a new AnnotationClassFilter for the given annotation type.- Parameters:
annotationType
- the annotation type to look for
-
AnnotationClassFilter
Create a new AnnotationClassFilter for the given annotation type.- Parameters:
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 useAnnotatedElementUtils.hasAnnotation(java.lang.reflect.AnnotatedElement, java.lang.Class<? extends java.lang.annotation.Annotation>)
semantics instead of standard JavaClass.isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation>)
)
-
-
Method Details
-
matches
Description copied from interface:ClassFilter
Should the pointcut apply to the given interface or target class?- Specified by:
matches
in interfaceClassFilter
- Parameters:
clazz
- the candidate target class- Returns:
- whether the advice should apply to the given target class
-
equals
-
hashCode
public int hashCode() -
toString
-