public final class AnnotationPredicates extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends Annotation> |
annotationAnnotatedWith(Class<? extends Annotation> annotationClass,
boolean includeMetaAnnotations)
Checks if the candidate is annotated by the specified annotation or meta-annotation.
|
static Predicate<Annotation> |
annotationIsOfClass(Class<? extends Annotation> annotationClass)
Checks if the candidate annotation is of the specified annotation class.
|
static Predicate<Class<?>> |
atLeastOneFieldAnnotatedWith(Class<? extends Annotation> annotationClass,
boolean includeMetaAnnotations)
Checks if the candidate or one of its superclasses has at least one field annotated or
meta-annotated by the given annotation.
|
static Predicate<Class<?>> |
atLeastOneMethodAnnotatedWith(Class<? extends Annotation> annotationClass,
boolean includeMetaAnnotations)
Checks if the candidate or one of its superclasses or interfaces has at least one method
annotated or meta-annotated
by the given annotation.
|
static Predicate<Class<?>> |
classOrAncestorAnnotatedWith(Class<? extends Annotation> annotationClass,
boolean includeMetaAnnotations)
Checks if the candidate or one of its superclasses or interfaces is annotated with the
specified annotation.
|
static <T extends AnnotatedElement> |
elementAnnotatedWith(Class<? extends Annotation> annotationClass,
boolean includeMetaAnnotations)
Checks if the candidate is annotated by the specified annotation or meta-annotation.
|
public static <T extends AnnotatedElement> Predicate<T> elementAnnotatedWith(Class<? extends Annotation> annotationClass, boolean includeMetaAnnotations)
annotationClass
- the annotation to check for.includeMetaAnnotations
- if true, meta-annotations are included in the search.public static <T extends Annotation> Predicate<T> annotationAnnotatedWith(Class<? extends Annotation> annotationClass, boolean includeMetaAnnotations)
annotationClass
- the annotation to check for.includeMetaAnnotations
- if true, meta-annotations are included in the search.public static Predicate<Class<?>> classOrAncestorAnnotatedWith(Class<? extends Annotation> annotationClass, boolean includeMetaAnnotations)
annotationClass
- the requested annotationincludeMetaAnnotations
- if true, meta-annotations are included in the search.public static Predicate<Annotation> annotationIsOfClass(Class<? extends Annotation> annotationClass)
annotationClass
- the annotation class to check for.public static Predicate<Class<?>> atLeastOneFieldAnnotatedWith(Class<? extends Annotation> annotationClass, boolean includeMetaAnnotations)
annotationClass
- the requested annotationincludeMetaAnnotations
- if true, meta-annotations are included in the search.public static Predicate<Class<?>> atLeastOneMethodAnnotatedWith(Class<? extends Annotation> annotationClass, boolean includeMetaAnnotations)
annotationClass
- the requested annotationincludeMetaAnnotations
- if true, meta-annotations are included in the search.Copyright © 2013-2018–2019 SeedStack. All rights reserved.