|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts2.convention.ReflectionTools
public class ReflectionTools
This class has some reflection helpers.
Constructor Summary | |
---|---|
ReflectionTools()
|
Method Summary | ||
---|---|---|
static boolean |
containsMethod(java.lang.Class<?> klass,
java.lang.String method,
java.lang.Class<?>... parameterTypes)
Determines if the class given contains the method. |
|
static
|
getAnnotation(java.lang.Class<?> klass,
java.lang.String methodName,
java.lang.Class<T> annotationClass)
Retrieves the annotation from the given method in the given class. |
|
static java.util.List<java.lang.Class<?>> |
getClassHierarchy(java.lang.Class<?> clazz)
Return the list of parent classes in order (Object will be at index 0) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReflectionTools()
Method Detail |
---|
public static boolean containsMethod(java.lang.Class<?> klass, java.lang.String method, java.lang.Class<?>... parameterTypes)
klass
- The class to check for the method.method
- The method name.parameterTypes
- The parameter types of the method.
public static <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<?> klass, java.lang.String methodName, java.lang.Class<T> annotationClass)
klass
- The class.methodName
- The method.annotationClass
- The annotation to get.
public static java.util.List<java.lang.Class<?>> getClassHierarchy(java.lang.Class<?> clazz)
clazz
- class to process
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |