类 DefaultReflectInvoke
java.lang.Object
tech.mhuang.pacebox.core.reflect.DefaultReflectInvoke
- 所有已实现的接口:
BaseReflectInvoke
JDK反射封裝
- 从以下版本开始:
- 1.0.0
- 作者:
- mhuang
-
字段概要
从接口继承的字段 tech.mhuang.pacebox.core.reflect.BaseReflectInvoke
CONST_TYPES -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明<T> TgetMethodToValue(Class<?> clazz, String methodName, Object... params) 反射调用方法<T> TgetMethodToValue(String clazzName, String methodName, Object... params) 反射调用方法从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 tech.mhuang.pacebox.core.reflect.BaseReflectInvoke
checkType, getClasses
-
构造器详细资料
-
DefaultReflectInvoke
public DefaultReflectInvoke()
-
-
方法详细资料
-
getMethodToValue
public <T> T getMethodToValue(Class<?> clazz, String methodName, Object... params) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException 反射调用方法- 指定者:
getMethodToValue在接口中BaseReflectInvoke- 类型参数:
T- 参数接收类型- 参数:
clazz- 调用的class类methodName- 调用的方法params- 调用的参数- 返回:
- 返回类型
- 抛出:
NoSuchMethodException- 没有找到方法异常SecurityException- 安全异常IllegalAccessException- 非法访问异常IllegalArgumentException- 非法参数异常InvocationTargetException- 调用目标异常InstantiationException- 实例化异常
-
getMethodToValue
public <T> T getMethodToValue(String clazzName, String methodName, Object... params) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException, ClassNotFoundException 反射调用方法- 指定者:
getMethodToValue在接口中BaseReflectInvoke- 类型参数:
T- 参数接收类型- 参数:
clazzName- 调用的class类的全路径methodName- 调用的方法params- 调用的参数- 返回:
- 返回类型
- 抛出:
NoSuchMethodException- 没有找到方法异常SecurityException- 安全异常IllegalAccessException- 非法访问异常IllegalArgumentException- 非法参数异常InvocationTargetException- 调用目标异常InstantiationException- 实例化异常ClassNotFoundException- 未找到对应Class异常
-