public interface ReflectUtil
| 限定符和类型 | 方法和说明 |
|---|---|
static Field[] |
getAllFields(Class<?> clz)
Get all fields
|
static Field[] |
getAllFields(Class<?> clz,
boolean includeStatic)
Get all fields
|
static <T,O> O |
getFieldValue(Class<T> clz,
T t,
String fieldName)
Get field value by name
|
static <T,O> O getFieldValue(Class<T> clz, T t, String fieldName) throws NoSuchFieldException
clz - t - fieldName - NoSuchFieldExceptionstatic Field[] getAllFields(Class<?> clz, boolean includeStatic)
clz - includeStatic - include static fields or notCopyright © 2018. All rights reserved.