public class ReflectionUtil extends Object
| Constructor and Description |
|---|
ReflectionUtil() |
| Modifier and Type | Method and Description |
|---|---|
static List<Method> |
findAllPersistentGetters(Class methodSource) |
static List<Method> |
getAllMethods(Class methodSource)
list all class methods, including inherited and private
|
static Class |
getGenericTypeClass(Type type)
Returns a class that represents the declared type for the field represented by this object.
|
static String |
getterToField(Method getter)
ex: getCode() -> code,
isTrue() -> true
|
static Object |
invokeField(Field field,
Object onObject) |
static Object |
invokeFieldEvenIfPrivate(Field field,
Object onObject) |
static Object |
invokeGetter(Method getter,
Object onObject) |
static Object |
invokeGetterEvenIfPrivate(Method getter,
Object onObject) |
static boolean |
isGetter(Method m) |
static boolean |
isPersistentGetter(Method m)
true if method is getter and
is not abstract
is not native
doesn't have @Transient
|
public static List<Method> getAllMethods(Class methodSource)
public static boolean isPersistentGetter(Method m)
public static boolean isGetter(Method m)
public static String getterToField(Method getter)
public static Object invokeGetterEvenIfPrivate(Method getter, Object onObject)
public static Object invokeFieldEvenIfPrivate(Field field, Object onObject)
Copyright © 2013. All rights reserved.