public final class ClassUtil extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends Member> |
checkAndFixAccess(T member)
Make the
Member accessible if possible, throw
IllegalArgumentException is not. |
static <T> Object |
getFieldValue(Field f,
T obj) |
static <T> Object |
getMethodValue(Method m,
T obj) |
static void |
setFieldValue(Field field,
Object obj,
Object value) |
static <T> void |
setMethodValue(Method m,
T obj,
Object value) |
public static <T extends Member> T checkAndFixAccess(T member)
Member
accessible if possible, throw
IllegalArgumentException
is not.member
- the member to checkIllegalArgumentException
- if cannot set accessibilityCopyright © 2016. All rights reserved.