public abstract class ReflectionUtil
extends java.lang.Object
Constructor and Description |
---|
ReflectionUtil() |
Modifier and Type | Method and Description |
---|---|
static <T extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.reflect.Method method,
java.lang.Class<T> type)
Returns the first
Annotation of the given type
defined on the given Method . |
static <T extends java.lang.annotation.Annotation> |
getAnnotations(java.lang.reflect.Method method,
java.lang.Class<T> type)
Returns
Annotation s of the given type defined
on the given Method . |
static java.lang.Object |
parseArguments(java.lang.reflect.Method method,
java.lang.Object[] arguments)
Parses the given arguments for the given method optionally
turning them into named parameters.
|
public static <T extends java.lang.annotation.Annotation> java.util.List<T> getAnnotations(java.lang.reflect.Method method, java.lang.Class<T> type)
Annotation
s of the given type defined
on the given Method
.T
- the Annotation
typemethod
- the Method
type
- the typeAnnotation
spublic static <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.reflect.Method method, java.lang.Class<T> type)
Annotation
of the given type
defined on the given Method
.T
- the typemethod
- the methodtype
- the type of annotationpublic static java.lang.Object parseArguments(java.lang.reflect.Method method, java.lang.Object[] arguments)
method
- the methodarguments
- the arguments