类 AnnotationClassFilter
- java.lang.Object
- org.springframework.aop.support.annotation.AnnotationClassFilter
- 所有已实现的接口:
ClassFilter
public class AnnotationClassFilter extends Object implements ClassFilter
Simple ClassFilter that looks for a specific Java 5 annotation being present on a class.- 从以下版本开始:
- 2.0
- 作者:
- Juergen Hoeller
- 另请参阅:
AnnotationMatchingPointcut
字段概要
从接口继承的字段 org.springframework.aop.ClassFilter
TRUE
构造器概要
构造器 构造器 说明 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.
构造器详细资料
AnnotationClassFilter
public AnnotationClassFilter(Class<? extends Annotation> annotationType)
Create a new AnnotationClassFilter for the given annotation type.- 参数:
annotationType
- the annotation type to look for
AnnotationClassFilter
public AnnotationClassFilter(Class<? extends Annotation> annotationType, boolean checkInherited)
Create a new AnnotationClassFilter for the given annotation type.- 参数:
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>)
)
方法详细资料
matches
public boolean matches(Class<?> clazz)
从接口复制的说明:ClassFilter
Should the pointcut apply to the given interface or target class?- 指定者:
matches
在接口中ClassFilter
- 参数:
clazz
- the candidate target class- 返回:
- whether the advice should apply to the given target class