public final class AnnotationDataProvider extends Object
Modifier and Type | Method and Description |
---|---|
static <T> T |
get(AnnotatedElement annotatedElement,
String annotationParameterName,
Class<? extends Annotation>... annotationClasses)
Returns the value of the annotation parameter with the given name of the annotation the given
annotatedElement is annotated with and which class is one of the given annotation classes.
|
static <T> T |
get(Annotation annotation,
String annotationParameterName)
Returns the value of the annotation parameter with the given name of the given annotation or null if it is
to be interpreted as null (as the empty
String , an empty array or special classes used as
defaults for the annotation parameter value). |
static boolean |
hasParameter(Class<? extends Annotation> annotationClass,
String annotationParameterName)
Returns true if the annotation class has an annotation parameter with the given name; false otherwise.
|
public static <T> T get(Annotation annotation, String annotationParameterName)
String
, an empty array or special classes used as
defaults for the annotation parameter value).T
- the expected type of the data to returnannotation
- the annotationannotationParameterName
- the annotation parameter namepublic static <T> T get(AnnotatedElement annotatedElement, String annotationParameterName, Class<? extends Annotation>... annotationClasses)
String
or special
classes used as defaults for the annotation parameter value).T
- the expected type of the returned dataannotatedElement
- the annotated elementannotationParameterName
- the name of the annotation parameterannotationClasses
- the annotation classespublic static boolean hasParameter(Class<? extends Annotation> annotationClass, String annotationParameterName)
annotationClass
- the annotation classannotationParameterName
- the annotation parameter nameCopyright © 2014. All rights reserved.