public final class Retrieve extends Object
Annotations.| Modifier and Type | Method and Description |
|---|---|
static <T extends Annotation> |
annotationValueOnClass(Class<T> annotationClass,
Class<?> annotatedClass)
Retrieve the value of an Annotation on a Class.
|
static <T extends Annotation> |
annotationValueOnClass(Class<T> annotationClass,
String attributeName,
Class<?> annotatedClass)
Retrieve the value of an Annotation attribute/method on a
Class.
|
static <T extends Annotation> |
annotationValueOnMethod(Class<T> annotationClass,
Class<?> classWithMethod,
String methodName,
Class<?>... parameterTypes)
Retrieve the value of an Annotation on a Method.
|
static <T extends Annotation> |
annotationValueOnMethod(Class<T> annotationClass,
Method method)
Retrieve the value of an Annotation on a Method.
|
static <T extends Annotation> |
annotationValueOnMethod(Class<T> annotationClass,
Method methodWithAnnotation,
String attributeName)
Retrieve the value of an Annotation on a Method.
|
static <T extends Annotation> |
annotationValueOnMethod(Class<T> annotationClass,
String attributeName,
Class<?> classWithMethod,
String methodName,
Class<?>... parameterTypes)
Retrieve the value of an Annotation on a Method.
|
static <T extends Annotation> |
annotationValueOnParameter(Class<T> annotationClass,
Class<?> classWithMethod,
String methodNameWithParameter,
String parameterName,
Class<?>... parameterTypes)
Retrieve the value of an Annotation on a method parameter.
|
static <T extends Annotation> |
annotationValueOnParameter(Class<T> annotationClass,
String attributeName,
Class<?> classWithMethod,
String methodNameWithParameter,
String parameterName,
Class<?>... parameterTypes)
Retrieve the value of an Annotation on a method parameter.
|
public static <T extends Annotation> Object annotationValueOnClass(Class<T> annotationClass, String attributeName, Class<?> annotatedClass)
attributeName from
annationClass on annotatedClass.
In case of error a ReflectionException is thrown.T - - a annotation classannotationClass - - the class of the AnnotationattributeName - - name of the attributeannotatedClass - - the class with the Annotationpublic static <T extends Annotation> Object annotationValueOnClass(Class<T> annotationClass, Class<?> annotatedClass)
value from
annationClass on annotatedClass.
In case of error a ReflectionException is thrown.T - - a annotation classannotationClass - - the class of the AnnotationannotatedClass - - the class with the Annotationpublic static <T extends Annotation> Object annotationValueOnMethod(Class<T> annotationClass, Method methodWithAnnotation, String attributeName)
attributeName from
annationClass on methodWithAnnotation.
In case of error a ReflectionException is thrown.T - - a annotation classannotationClass - - the class of the AnnotationmethodWithAnnotation - - method with annotationattributeName - - name of the attributepublic static <T extends Annotation> Object annotationValueOnMethod(Class<T> annotationClass, String attributeName, Class<?> classWithMethod, String methodName, Class<?>... parameterTypes)
attributeName of
annotationClass from methodName of
classWithMethod.
In case of error a ReflectionException is thrown.T - - a annotation classannotationClass - - the class of the AnnotationattributeName - - name of the attributeclassWithMethod - - class with the methodmethodName - - name of method with the annotationparameterTypes - - parameter types of methodNamepublic static <T extends Annotation> Object annotationValueOnMethod(Class<T> annotationClass, Method method)
value from
annationClass on method.
In case of error a ReflectionException is thrown.T - - a annotation classannotationClass - - the class of the Annotationmethod - - the method with the Annotationpublic static <T extends Annotation> Object annotationValueOnMethod(Class<T> annotationClass, Class<?> classWithMethod, String methodName, Class<?>... parameterTypes)
value from
annationClass of methodName of annotatedClass.
In case of error a ReflectionException is thrown.T - - a annotation classannotationClass - - the class of the AnnotationclassWithMethod - - class with methodmethodName - - name of method with annotationparameterTypes - - parameter types of methodNamepublic static <T extends Annotation> Object annotationValueOnParameter(Class<T> annotationClass, String attributeName, Class<?> classWithMethod, String methodNameWithParameter, String parameterName, Class<?>... parameterTypes)
attributeName from annotationClass
The Annotation is expected at the Method methodNameWithParameter
in the class classWithMethod. If the Method is polymorphic
overriden,
the Signature can be provided with parameterTypes.T - - the annotation classannotationClass - - class of the annotationattributeName - - name of the attributeclassWithMethod - - class of the methodmethodNameWithParameter - - the method nameparameterName - - name of the parameterparameterTypes - - Types of the methodpublic static <T extends Annotation> Object annotationValueOnParameter(Class<T> annotationClass, Class<?> classWithMethod, String methodNameWithParameter, String parameterName, Class<?>... parameterTypes)
annotationClass The Annotation
is expected at the Method methodNameWithParameter in the class
classWithMethod. If the Method is polymorphic overridden,
the Signature can be provided with parameterTypes.T - - the annotation classannotationClass - - class of the annotationclassWithMethod - - class of the methodmethodNameWithParameter - - the method nameparameterName - - name of the parameterparameterTypes - - Types of the method parameterCopyright © 2014–2015. All rights reserved.