public class ReflectionUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ReflectionUtil.ClassReflection |
Constructor and Description |
---|
ReflectionUtil() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
get(Object instance,
Class<?> clazz,
String f,
Class<T> t) |
static <T> T |
get(Object o,
String f,
Class<T> t) |
static <T> T |
getPublic(Object o,
String f,
Class<T> t) |
static <T> T |
getStatic(Class<?> clazz,
String f,
Class<T> t) |
static <T> T |
getSuper(Object o,
String f,
Class<T> t) |
static Object |
invoke(Object o,
String method) |
static Object |
invokeStatic(Class<?> clazz,
String method) |
static void |
set(Object o,
String f,
Object value) |
static void |
setStatic(Class<?> clazz,
String f,
Object value) |
public static Object invokeStatic(Class<?> clazz, String method) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException
public static Object invoke(Object o, String method) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException
public static <T> T getStatic(Class<?> clazz, String f, Class<T> t) throws NoSuchFieldException, IllegalAccessException
public static void setStatic(Class<?> clazz, String f, Object value) throws NoSuchFieldException, IllegalAccessException
public static <T> T getSuper(Object o, String f, Class<T> t) throws NoSuchFieldException, IllegalAccessException
public static <T> T get(Object instance, Class<?> clazz, String f, Class<T> t) throws NoSuchFieldException, IllegalAccessException
public static <T> T get(Object o, String f, Class<T> t) throws NoSuchFieldException, IllegalAccessException
public static <T> T getPublic(Object o, String f, Class<T> t) throws NoSuchFieldException, IllegalAccessException
public static void set(Object o, String f, Object value) throws NoSuchFieldException, IllegalAccessException
Copyright © 2016–2021. All rights reserved.