public class ReflectionUtils
extends java.lang.Object
| Constructor and Description |
|---|
ReflectionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getPrivateFieldValue(java.lang.Object owner,
java.lang.String fieldName)
Returns the value of the specified private field for the given
owner.
|
static <T> void |
setPrivateFieldValue(java.lang.Object owner,
java.lang.String fieldName,
T value)
Sets the value of the specified private field for the given owner
to the given value.
|
public static <T> T getPrivateFieldValue(java.lang.Object owner,
java.lang.String fieldName)
T - The type of the field value.owner - Object from which the field is read.fieldName - Name of the field to read.public static <T> void setPrivateFieldValue(java.lang.Object owner,
java.lang.String fieldName,
T value)
T - The type of the field value.owner - Object for which the field is set.fieldName - Name of the field.value - New value for the field.Copyright (c) 2014 itemis AG and others. All rights reserved.