public class ReflectionHelper extends Object
Constructor and Description |
---|
ReflectionHelper() |
Modifier and Type | Method and Description |
---|---|
static <T,E> T |
getPrivateField(E instance,
Class<T> returnType,
String fieldName) |
static <T,E> T |
getPrivateField(E instance,
String fieldName) |
static <T,E> T |
getPrivateStaticField(Class<E> clazz,
Class<T> returnType,
String fieldName) |
static <T,E> T |
getPrivateStaticField(Class<E> clazz,
String fieldName) |
static <T,E> void |
setPrivateField(E instance,
String fieldName,
T value) |
public ReflectionHelper()
public static <T,E> T getPrivateField(E instance, Class<T> returnType, String fieldName) throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException
public static <T,E> T getPrivateField(E instance, String fieldName) throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException
public static <T,E> void setPrivateField(E instance, String fieldName, T value) throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException
public static <T,E> T getPrivateStaticField(Class<E> clazz, Class<T> returnType, String fieldName) throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException
public static <T,E> T getPrivateStaticField(Class<E> clazz, String fieldName) throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2019 Jens Lehmann