Package org.eclipse.lemminx.extensions.xerces

## Class ReflectionUtils

- java.lang.Object
- - org.eclipse.lemminx.extensions.xerces.ReflectionUtils

    public class ReflectionUtils
    extends Object

Java reflection utilities. In LemMinx context (with LemMinx binary context), Java reflection should be forbidden. But to fix some Xerces bugs and improve some Xerces feature, Java reflection is required to get access to some field which are private. It's one reason why this `ReflectionUtils` is in the xerces package and not in the org.eclipse.lemminx.utils package.

### Constructor Summary

Constructors
`ReflectionUtils()`

### Method Summary

All Methods Static Methods Concrete Methods
`static <T> T` `getFieldValue​(Object instance, String name)` Returns the field value of the given instance and field name.
`static <T> void` `setFieldValue​(Object instance, String name, T 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

#### getFieldValue

    public static <T> T getFieldValue​(Object instance,
                                      String name)
                               throws NoSuchFieldException,
                                      SecurityException,
                                      IllegalArgumentException,
                                      IllegalAccessException

Returns the field value of the given instance and field name.

Type Parameters:
  `T` - the field value type.
Parameters:
  `instance` - the instance.
  `name` - the field name.
Returns:
  the field value of the given instance and field name.
Throws:
  `NoSuchFieldException`
  `SecurityException`
  `IllegalArgumentException`
  `IllegalAccessException`

#### setFieldValue

    public static <T> void setFieldValue​(Object instance,
                                         String name,
                                         T value)
                                  throws NoSuchFieldException,
                                         SecurityException,
                                         IllegalArgumentException,
                                         IllegalAccessException

Throws:
  `NoSuchFieldException`
  `SecurityException`
  `IllegalArgumentException`
  `IllegalAccessException`