public abstract class ReflectionUtils extends Object
ClassUtils| 构造器和说明 |
|---|
ReflectionUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Object |
getFieldValue(Object obj,
Field field)
Get field value
|
static Object |
invokeMethod(Object obj,
Method method,
Object... args)
Invoke method
|
static <E> E |
newInstance(Class<E> clazz)
Creates a new instance of the class represented by this Class object
|
static void |
setFieldValue(Object obj,
Field field,
Object value)
Set field value
|
public static <E> E newInstance(Class<E> clazz)
E - the class typeclazz - the classpublic static Object invokeMethod(Object obj, Method method, Object... args)
obj - the objectmethod - the methodargs - the method argumentspublic static Object getFieldValue(Object obj, Field field)
obj - the objectfield - the fieldCopyright © 2019. All rights reserved.