Package org.eclipse.gef.common.reflect

## Class ReflectionUtils

- java.lang.Object
- - org.eclipse.gef.common.reflect.ReflectionUtils

    public class ReflectionUtils
    extends java.lang.Object

Allows to access the value of private fields.

### Constructor Summary

Constructors
`ReflectionUtils()`

### Method Summary

All Methods Static Methods Concrete Methods
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ReflectionUtils

    public ReflectionUtils()

### Method Detail

#### getPrivateFieldValue

    public static <T> T getPrivateFieldValue​(java.lang.Object owner,
                                             java.lang.String fieldName)

Returns the value of the specified private field for the given owner.

Type Parameters:
  `T` - The type of the field value.
Parameters:
  `owner` - `Object` from which the field is read.
  `fieldName` - Name of the field to read.
Returns:
  The value of the specified field for the given owner.

#### setPrivateFieldValue

    public 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.

Type Parameters:
  `T` - The type of the field value.
Parameters:
  `owner` - `Object` for which the field is set.
  `fieldName` - Name of the field.
  `value` - New value for the field.