diff --git a/ebean-api/src/main/java/io/ebean/util/AnnotationUtil.java b/ebean-api/src/main/java/io/ebean/util/AnnotationUtil.java index 583c99009..69127a316 100644 --- a/ebean-api/src/main/java/io/ebean/util/AnnotationUtil.java +++ b/ebean-api/src/main/java/io/ebean/util/AnnotationUtil.java @@ -71,6 +71,14 @@ public class AnnotationUtil { return typeGet(clazz, annotation) != null; } + public static boolean metaHas(AnnotatedElement element, Class annotationType) { + return !metaFindAll(element, annotationType).isEmpty(); + } + + public static Set metaFindAll(AnnotatedElement element, Class annotationType) { + return metaFindAllFor(element, Collections.singleton(annotationType)); + } + /** * Find all the annotations for the filter searching meta-annotations. */