| Modifier and Type | Field and Description |
|---|---|
static String |
GET_PREFIX |
static String |
IS_PREFIX |
| Modifier and Type | Method and Description |
|---|---|
static String |
decapitalize(String methodName,
String prefix) |
static Field |
findField(Class<?> clazz,
String name)
Tries to find a public field with the given name on the given class.
|
static Method |
findMethod(Class<?> clazz,
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 Set<Field> |
getFields(Class<?> clazz) |
static Set<Method> |
getMethods(Class<?> clazz) |
static boolean |
isMethodValid(Method method)
A read method:
is public
has no parameters
has non-void return type
its declaring class is not
Object
|
public static final String GET_PREFIX
public static final String IS_PREFIX
public static Method findMethod(Class<?> clazz, String name)
clazz - name - nullisMethodValid(Method)public static Field findField(Class<?> clazz, String name)
clazz - name - nullpublic static boolean isMethodValid(Method method)
Objectmethod - true if the given method is considered a read methodpublic static Set<Method> getMethods(Class<?> clazz)
clazz - public static Set<Field> getFields(Class<?> clazz)
clazz - Copyright © 2015. All Rights Reserved.