@Internal public final class Reflections extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
GET_PREFIX |
static java.lang.String |
IS_PREFIX |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
decapitalize(java.lang.String methodName,
java.lang.String prefix) |
static java.lang.reflect.Field |
findField(java.lang.Class<?> clazz,
java.lang.String name)
Tries to find a public field with the given name on the given class.
|
static java.lang.reflect.Method |
findMethod(java.lang.Class<?> clazz,
java.lang.String name)
First tries to find a valid method with the same name, afterwards method
following JavaBean naming convention (the method starts with
get/is prefix).
|
static java.util.Set<java.lang.reflect.Field> |
getFields(java.lang.Class<?> clazz) |
static java.util.Set<java.lang.reflect.Method> |
getMethods(java.lang.Class<?> clazz) |
static boolean |
isMethodValid(java.lang.reflect.Method method)
A read method:
is public
has no parameters
has non-void return type
its declaring class is not
Object
|
public static final java.lang.String GET_PREFIX
public static final java.lang.String IS_PREFIX
public static java.lang.reflect.Method findMethod(java.lang.Class<?> clazz,
java.lang.String name)
clazz - name - nullisMethodValid(Method)public static java.lang.reflect.Field findField(java.lang.Class<?> clazz,
java.lang.String name)
clazz - name - nullpublic static boolean isMethodValid(java.lang.reflect.Method method)
Objectmethod - true if the given method is considered a read methodpublic static java.util.Set<java.lang.reflect.Method> getMethods(java.lang.Class<?> clazz)
clazz - public static java.util.Set<java.lang.reflect.Field> getFields(java.lang.Class<?> clazz)
clazz - public static java.lang.String decapitalize(java.lang.String methodName,
java.lang.String prefix)
methodName - prefix - Copyright © 2014. All Rights Reserved.