ADD: javadoc

This commit is contained in:
Jonas Pöhler
2021-12-17 15:10:30 +01:00
parent 058021f8d0
commit 91d1fb8cea
@@ -71,10 +71,16 @@ public class AnnotationUtil {
return typeGet(clazz, annotation) != null;
}
/**
* Check if an element is annotated with an annotation of given type searching meta-annotations.
*/
public static boolean metaHas(AnnotatedElement element, Class<?> annotationType) {
return !metaFindAll(element, annotationType).isEmpty();
}
/**
* Find all the annotations of a given type searching meta-annotations.
*/
public static Set<Annotation> metaFindAll(AnnotatedElement element, Class<?> annotationType) {
return metaFindAllFor(element, Collections.singleton(annotationType));
}