org.jagatoo.util.classes
Class AnnotationCriterium
java.lang.Object
org.jagatoo.util.classes.AnnotationCriterium
- All Implemented Interfaces:
- ClassSearchCriterium
public class AnnotationCriterium
- extends java.lang.Object
- implements ClassSearchCriterium
This is a ClassSearcher Criterium, that ensures, that checked class
is annotated with a certain Annotation.
- Author:
- Marvin Froehlich (aka Qudus)
Constructor Summary |
AnnotationCriterium(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
|
Method Summary |
boolean |
check(java.lang.Class<?> clazz)
Tests the given Class for a specific constraint. |
java.lang.Class<? extends java.lang.annotation.Annotation> |
getAnnotation()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnnotationCriterium
public AnnotationCriterium(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
getAnnotation
public final java.lang.Class<? extends java.lang.annotation.Annotation> getAnnotation()
check
public boolean check(java.lang.Class<?> clazz)
- Tests the given Class for a specific constraint.
- Specified by:
check
in interface ClassSearchCriterium
- Parameters:
clazz
- the class
- Returns:
- true, if the test is successful