public class ClassUtils extends Object
| Constructor and Description |
|---|
ClassUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Set<Method> |
getAllMethod(Class<?> entityClass)
获取一个类的所有方法
|
static String |
getFieldNameByGetMethodName(String methodName)
由Get Method名称获取Field名
|
static Object |
getValeByType(Class<?> type,
Object value)
根据Field类型返回值
|
static void |
setFieldValeByType(Field field,
Object obj,
String value)
根据Field类型设置值
|
public static String getFieldNameByGetMethodName(String methodName)
public static void setFieldValeByType(Field field, Object obj, String value) throws Exception
field - Exceptionpublic static Object getValeByType(Class<?> type, Object value) throws Exception
type - value - ExceptionCopyright © 2015–2016 Baidu. All rights reserved.