| 限定符和类型 | 方法和说明 |
|---|---|
static Class<?> |
getClass(Type type) |
static Type[] |
getClassGenericTypes(Class<?> clazz) |
static String |
getClassName(Type type) |
static Object |
getEnumConstant(Class<?> clazz,
String name) |
static Class<?> |
getFieldClass(Class<?> clazz,
String name) |
static Class<?> |
getMethodReturnType(Class<?> clazz,
String name) |
static Object |
getObjectValue(Object target,
String propertyName)
获取指定某个对象指定属性的值
|
static boolean |
hasDefaultConstructor(Class<?> clazz) |
static Object |
newInstance(Type type) |
public static Object getObjectValue(Object target, String propertyName)
target - propertyName - SecurityExceptionNoSuchFieldExceptionpublic static Class<?> getClass(Type type) throws ClassNotFoundException
public static Object newInstance(Type type) throws ClassNotFoundException, InstantiationException, IllegalAccessException
public static boolean hasDefaultConstructor(Class<?> clazz) throws SecurityException
Copyright © 2016. All rights reserved.