|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.core.type.filter.AbstractTypeHierarchyTraversingFilter org.springframework.core.type.filter.AnnotationTypeFilter
public class AnnotationTypeFilter
A simple filter which matches classes with a given annotation, checking inherited annotations as well.
The matching logic mirrors that of Class.isAnnotationPresent()
.
Field Summary | |
---|---|
private java.lang.Class<? extends java.lang.annotation.Annotation> |
annotationType
|
private boolean |
considerMetaAnnotations
|
Constructor Summary | |
---|---|
AnnotationTypeFilter(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Create a new AnnotationTypeFilter for the given annotation type. |
|
AnnotationTypeFilter(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
boolean considerMetaAnnotations)
Create a new AnnotationTypeFilter for the given annotation type. |
Method Summary | |
---|---|
protected boolean |
matchSelf(MetadataReader metadataReader)
Override this to match self characteristics alone. |
protected java.lang.Boolean |
matchSuperClass(java.lang.String superClassName)
Override this to match on super type name. |
Methods inherited from class org.springframework.core.type.filter.AbstractTypeHierarchyTraversingFilter |
---|
match, matchClassName, matchInterface |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.lang.Class<? extends java.lang.annotation.Annotation> annotationType
private final boolean considerMetaAnnotations
Constructor Detail |
---|
public AnnotationTypeFilter(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
considerMetaAnnotations
' argument.
annotationType
- the annotation type to matchpublic AnnotationTypeFilter(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, boolean considerMetaAnnotations)
annotationType
- the annotation type to matchconsiderMetaAnnotations
- whether to also match on meta-annotationsMethod Detail |
---|
protected boolean matchSelf(MetadataReader metadataReader)
AbstractTypeHierarchyTraversingFilter
matchSelf
in class AbstractTypeHierarchyTraversingFilter
protected java.lang.Boolean matchSuperClass(java.lang.String superClassName)
AbstractTypeHierarchyTraversingFilter
matchSuperClass
in class AbstractTypeHierarchyTraversingFilter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |