public class ReflectionUtils extends Object
| Constructor and Description |
|---|
ReflectionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
getPrivateStatic(Class<?> clazz,
String fieldName) |
static void |
setFinalStatic(Class<?> clazz,
String fieldName,
Object newValue)
Change value of static final field.
|
static void |
setFinalStatic(Field field,
Object newValue)
Change value of static final field.
|
static void |
setPrivateStatic(Class<?> clazz,
String fieldName,
Object newValue) |
public static void setFinalStatic(Field field, Object newValue) throws Exception
field - static final fieldnewValue - new value for this fieldExceptionpublic static void setFinalStatic(Class<?> clazz, String fieldName, Object newValue) throws Exception
clazz - class with static final fieldfieldName - name of static final fieldnewValue - new value for this fieldExceptionpublic static Object getPrivateStatic(Class<?> clazz, String fieldName) throws Exception
Exception