public final class Utils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends Annotation> |
getAnnotation(Class<T> annotationType,
AnnotatedElement... objects)
Utility method to read out repeatable annotations.
|
static <T extends Annotation,R extends Annotation> |
getAnnotations(AccessibleObject annotated,
Class<T> repeatableAnnotation,
Class<R> annotationContainer)
Utility method to read out repeatable annotations.
|
static <T extends Annotation,R extends Annotation> |
getAnnotations(AnnotatedElement annotated,
Class<T> repeatableAnnotation,
Class<R> annotationContainer)
Utility method to read out repeatable annotations.
|
public static <T extends Annotation,R extends Annotation> Collection<T> getAnnotations(AnnotatedElement annotated, Class<T> repeatableAnnotation, Class<R> annotationContainer)
T - the repeatable annotation typeR - the repeatable container annotation typeannotated - the annotated instance.repeatableAnnotation - the repeatable annotation typeannotationContainer - the container annotation typepublic static <T extends Annotation,R extends Annotation> Collection<T> getAnnotations(AccessibleObject annotated, Class<T> repeatableAnnotation, Class<R> annotationContainer)
T - the repeatable annotation typeR - the repeatable container annotation typeannotated - the annotated instance.repeatableAnnotation - the repeatable annotation typeannotationContainer - the container annotation typepublic static <T extends Annotation> T getAnnotation(Class<T> annotationType, AnnotatedElement... objects)
T - the repeatable annotation typeannotationType - the annotation type.objects - the accessible objects to be looked upCopyright © 2014–2016 Apache Software Foundation. All rights reserved.