mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-22 15:10:02 +00:00
ADD: metaHas and metaFindAll as functional sugar
This commit is contained in:
1 parent
68b7deba9d
commit
058021f8d0
1 file changed
+8
@@ -71,6 +71,14 @@ public class AnnotationUtil {
|
|||||||
return typeGet(clazz, annotation) != null;
|
return typeGet(clazz, annotation) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean metaHas(AnnotatedElement element, Class<?> annotationType) {
|
||||||
|
return !metaFindAll(element, annotationType).isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Set<Annotation> metaFindAll(AnnotatedElement element, Class<?> annotationType) {
|
||||||
|
return metaFindAllFor(element, Collections.singleton(annotationType));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find all the annotations for the filter searching meta-annotations.
|
* Find all the annotations for the filter searching meta-annotations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in new issue
Block a user