public class ReflectionUtil extends Object
| 构造器和说明 |
|---|
ReflectionUtil() |
public static Object invokeMethod(Object obj, String methodName, Class<?>[] parameterTypes, Object[] args)
public static Object invokeMethodByName(Object obj, String methodName, Object[] args)
public static Method getAccessibleMethod(Object obj, String methodName, Class<?>... parameterTypes)
public static Method getAccessibleMethodByName(Object obj, String methodName)
public static void makeAccessible(Method method)
public static void makeAccessible(Field field)
public static RuntimeException convertReflectionExceptionToUnchecked(Exception e)
public static void setFieldValue2(Object obj, String fieldPath, Object value) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, InstantiationException
public static Object getFieldValue2(Object obj, String fieldPath) throws NoSuchFieldException, IllegalAccessException
Copyright © 2019. All rights reserved.