|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.dfki.util.xmlrpc.annotation.AnnotationUtils
public class AnnotationUtils
Convenience methods for getting annotations from classes, objects, methods, ... (they are not always located were we expect them to be)
Constructor Summary | |
---|---|
AnnotationUtils()
|
Method Summary | ||
---|---|---|
static
|
getAnnotation(java.lang.annotation.Annotation[] annos,
java.lang.Class<T> annoClass)
Get annotation of specific type out of an array of annotations. |
|
static
|
getAnnotationForClass(java.lang.Class<?> sourceClass,
java.lang.Class<T> annotationClass)
Gets annotations for a class. |
|
static
|
getAnnotationForObject(java.lang.Object source,
java.lang.Class<T> annotationClass)
Gets annotations for an object. |
|
static
|
getAnnotationFromMethod(java.lang.reflect.Method m,
java.lang.Class<T> annoClass)
|
|
static java.lang.annotation.Annotation[] |
getAnnotationFromMethodParameter(java.lang.reflect.Method m,
int pos)
Gets a parameter annotation. |
|
static java.lang.annotation.Annotation[] |
getAnnotationsFrom(java.lang.reflect.Method m)
Get annotations from a method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnnotationUtils()
Method Detail |
---|
public static final <T extends java.lang.annotation.Annotation> T getAnnotationForObject(java.lang.Object source, java.lang.Class<T> annotationClass)
getAnnotationForClass(Class, Class)
.
public static final <T extends java.lang.annotation.Annotation> T getAnnotationForClass(java.lang.Class<?> sourceClass, java.lang.Class<T> annotationClass)
public static <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.annotation.Annotation[] annos, java.lang.Class<T> annoClass)
null
, if array is null
or annotation is not contained in array, the annotation otherwise.public static java.lang.annotation.Annotation[] getAnnotationsFrom(java.lang.reflect.Method m)
public static <T extends java.lang.annotation.Annotation> T getAnnotationFromMethod(java.lang.reflect.Method m, java.lang.Class<T> annoClass)
public static java.lang.annotation.Annotation[] getAnnotationFromMethodParameter(java.lang.reflect.Method m, int pos)
pos
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |