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 fieldException
public 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 fieldException
public static Object getPrivateStatic(Class<?> clazz, String fieldName) throws Exception
Exception