|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.util.reflect.base.AnnotationFilter
public class AnnotationFilter
This is a filter that only accepts types
that are annotated with an
annotation given at construction.
| Field Summary | |
|---|---|
private Class<? extends Annotation> |
annotationType
The required annotation. |
private AnnotationUtilImpl |
annotationUtil
The AnnotationUtilImpl to use. |
private boolean |
forceInheritence
If true then also types are accepted if one of their
super-types (including implemented interfaces) is properly annotated (see
AnnotationUtilImpl.getTypeAnnotation(Class, Class)). |
| Constructor Summary | |
|---|---|
AnnotationFilter(Class<? extends Annotation> annotationType)
The constructor. |
|
AnnotationFilter(Class<? extends Annotation> annotationType,
boolean forceInheritence)
The constructor. |
|
AnnotationFilter(Class<? extends Annotation> annotationType,
boolean forceInheritence,
AnnotationUtilImpl annotationUtil)
The constructor. |
|
| Method Summary | |
|---|---|
boolean |
accept(Class<?> type)
This method determines if the given value should be accepted. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private AnnotationUtilImpl annotationUtil
AnnotationUtilImpl to use.
private final Class<? extends Annotation> annotationType
private final boolean forceInheritence
true then also types are accepted if one of their
super-types (including implemented interfaces) is properly annotated (see
AnnotationUtilImpl.getTypeAnnotation(Class, Class)).
| Constructor Detail |
|---|
public AnnotationFilter(Class<? extends Annotation> annotationType)
throws IllegalArgumentException
annotationType - is the annotation that has to be
present if a type should be
accepted.
IllegalArgumentException - if the given annotationType
is NO runtime
annotation.
public AnnotationFilter(Class<? extends Annotation> annotationType,
boolean forceInheritence)
throws IllegalArgumentException
annotationType - is the annotation that has to be
present if a type should be
accepted.forceInheritence - if true then also types are accepted
if one of their super-types (including implemented interfaces) is
properly annotated (see
AnnotationUtilImpl.getTypeAnnotation(Class, Class)).
IllegalArgumentException - if the given annotationType
is NO runtime
annotation.
public AnnotationFilter(Class<? extends Annotation> annotationType,
boolean forceInheritence,
AnnotationUtilImpl annotationUtil)
throws IllegalArgumentException
annotationType - is the annotation that has to be
present if a type should be
accepted.forceInheritence - if true then also types are accepted
if one of their super-types (including implemented interfaces) is
properly annotated (see
AnnotationUtilImpl.getTypeAnnotation(Class, Class)).annotationUtil - is the AnnotationUtilImpl instance to use.
IllegalArgumentException - if the given annotationType
is NO runtime
annotation.| Method Detail |
|---|
public boolean accept(Class<?> type)
value should be accepted.
accept in interface Filter<Class<?>>type - is the value to check.
true if the specified
annotation is present for
the given type, false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||