类 JavaReflection
java.lang.Object
org.ssssssss.script.reflection.JavaReflection
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static JavaInvoker<Constructor>findConstructorInvoker(List<Constructor<?>> constructors, Class<?>[] parameterTypes) static JavaInvoker<Method>findInvoker(Class<?> cls, String name) static JavaInvoker<Method>findInvoker(Class<?> cls, String name, Class<?>[] parameterTypes) Returns the method best matching the given signature, including type coercion, or null.static <T extends Executable>
JavaInvoker<T>findInvoker(List<JavaInvoker<T>> executables, Class<?>[] parameterTypes) static JavaInvoker<Method>findMethodInvoker(List<JavaInvoker<Method>> methods, Class<?>[] parameterTypes) static JavaInvoker<Method>getExtensionMethod(Object obj, String name, Object... arguments) static Field获取字段static ObjectgetFieldValue(Object obj, Field field) static JavaInvoker<Method>getFunction(String name, Object... arguments) static List<JavaInvoker<Method>>static ObjectgetInnerClass(Object obj, String name) 获取内部类static JavaInvoker<Method>static String[]getStringTypes(Object[] objects) 获取String类型的参数描述static booleanisPrimitiveAssignableFrom(Class<?> from, Class<?> to) 是否可以自动装修拆箱static voidregisterFunction(Object target) static voidregisterImplicitConvert(ClassImplicitConvert classImplicitConvert) 注册隐式转换器static voidregisterMethodExtension(Class<?> target, Object extensionObject) 注册扩展方法static voidsetFieldValue(Object obj, Field field, Object value)
-
构造器详细资料
-
JavaReflection
public JavaReflection()
-
-
方法详细资料
-
registerFunction
-
getExtensionMap
-
getFunctions
-
findMethodInvoker
public static JavaInvoker<Method> findMethodInvoker(List<JavaInvoker<Method>> methods, Class<?>[] parameterTypes) -
findConstructorInvoker
public static JavaInvoker<Constructor> findConstructorInvoker(List<Constructor<?>> constructors, Class<?>[] parameterTypes) -
findInvoker
public static <T extends Executable> JavaInvoker<T> findInvoker(List<JavaInvoker<T>> executables, Class<?>[] parameterTypes) -
findInvoker
Returns the method best matching the given signature, including type coercion, or null. -
findInvoker
-
isPrimitiveAssignableFrom
是否可以自动装修拆箱 -
getStringTypes
获取String类型的参数描述 -
getInnerClass
获取内部类- 参数:
obj- 目标对象,可以是实例,可以是Classname- 内部类名称
-
getField
获取字段- 参数:
obj- 目标对象可以是实例,可以是Classname- 字段名称- 返回:
-
registerImplicitConvert
注册隐式转换器 -
registerMethodExtension
注册扩展方法- 参数:
target- 目标类extensionObject- 实现类
-
getFieldValue
-
setFieldValue
-
getExtensionMethod
-
getMethod
-
getFunction
-