public final class Beans
extends java.lang.Object
| 限定符和类型 | 方法和说明 |
|---|---|
static java.lang.String |
getFieldName(java.lang.reflect.Method method)
Extrats the name of the field from its accessor method.
|
static java.lang.String |
getFieldValueAsString(java.lang.Object beanObj,
java.lang.String fieldName)
Given a Bean and a field of it, returns the value of the field converted to String.
|
static boolean |
isInstantiableType(java.lang.Class<?> clz)
Check whether a class is instantiable of not.
|
public static java.lang.String getFieldName(java.lang.reflect.Method method)
method - any accessor Method of the field.public static java.lang.String getFieldValueAsString(java.lang.Object beanObj,
java.lang.String fieldName)
throws java.lang.Exception
null is returned if the value of the field itself is null.beanObj - bean of which the field value to be extracted.fieldName - Name of the property/field of the object.java.lang.Exception - if the bean or the fields accessor methods are not accessible.public static boolean isInstantiableType(java.lang.Class<?> clz)
clz - the Class which needs to verified.