@Test public void testFastInvoke() throws InvocationTargetException { ReflectClass0 obj = new ReflectClass0(); Object ret = Reflects.fastInvoke(obj, "method", new Class[] { String.class }, new Object[] { "Jupiter" }); System.out.println(ret); assertThat(String.valueOf(ret), is("Hello Jupiter")); }
public static Object fastInvoke(Object obj, String methodName, Class<?>[] parameterTypes, Object[] args) { FastMethodAccessor accessor = FastMethodAccessor.get(obj.getClass()); return accessor.invoke(obj, methodName, parameterTypes, args); }
Reflects { public static Object fastInvoke(Object obj, String methodName, Class<?>[] parameterTypes, Object[] args) { FastMethodAccessor accessor = FastMethodAccessor.get(obj.getClass()); return accessor.invoke(obj, methodName, parameterTypes, args); } }
Reflects { public static Object fastInvoke(Object obj, String methodName, Class<?>[] parameterTypes, Object[] args) { FastMethodAccessor accessor = FastMethodAccessor.get(obj.getClass()); return accessor.invoke(obj, methodName, parameterTypes, args); } private  Reflects(); }
Reflects { public static Object fastInvoke(Object obj, String methodName, Class<?>[] parameterTypes, Object[] args) { FastMethodAccessor accessor = FastMethodAccessor.get(obj.getClass()); return accessor.invoke(obj, methodName, parameterTypes, args); } private  Reflects(); static Object fastInvoke(Object obj, String methodName, Class<?>[] parameterTypes, Object[] args); static Field getField(Class<?> clazz, String name); static Object getStaticValue(Class<?> clazz, String name); static void setStaticValue(Class<?> clazz, String name, Object value); static Object getValue(Object o, String name); static void setValue(Object o, String name, Object value); static Object getTypeDefaultValue(Class<?> clazz); static String simpleClassName(Object o); static String simpleClassName(Class<?> clazz); static Class<?>[] findMatchingParameterTypes(List<Class<?>[]> parameterTypesList, Object[] args); static Pair<Class<?>[], Ext> findMatchingParameterTypesExt(List<Pair<Class<?>[], Ext>> pairs, Object[] args); static boolean isAssignable(Class<?>[] classArray, Class<?>[] toClassArray, final boolean autoboxing); static boolean isAssignable(Class<?> cls, final Class<?> toClass, final boolean autoboxing); static Class<?> primitiveToWrapper(final Class<?> cls); static Class<?> wrapperToPrimitive(final Class<?> cls); }
Reflects { public static Object fastInvoke(Object obj, String methodName, Class<?>[] parameterTypes, Object[] args) { FastMethodAccessor accessor = FastMethodAccessor.get(obj.getClass()); return accessor.invoke(obj, methodName, parameterTypes, args); } private  Reflects(); static Object fastInvoke(Object obj, String methodName, Class<?>[] parameterTypes, Object[] args); static Field getField(Class<?> clazz, String name); static Object getStaticValue(Class<?> clazz, String name); static void setStaticValue(Class<?> clazz, String name, Object value); static Object getValue(Object o, String name); static void setValue(Object o, String name, Object value); static Object getTypeDefaultValue(Class<?> clazz); static String simpleClassName(Object o); static String simpleClassName(Class<?> clazz); static Class<?>[] findMatchingParameterTypes(List<Class<?>[]> parameterTypesList, Object[] args); static Pair<Class<?>[], Ext> findMatchingParameterTypesExt(List<Pair<Class<?>[], Ext>> pairs, Object[] args); static boolean isAssignable(Class<?>[] classArray, Class<?>[] toClassArray, final boolean autoboxing); static boolean isAssignable(Class<?> cls, final Class<?> toClass, final boolean autoboxing); static Class<?> primitiveToWrapper(final Class<?> cls); static Class<?> wrapperToPrimitive(final Class<?> cls);  }