@Test public void testCall_01() { Person p = new Person(); p.setAge(15); double d = (double) ReflectionUtil.call(p, "calculateMinimumWage", new Class<?>[] {int.class, boolean.class}, 1000, true); assertTrue("01", d == 16000); }
@SuppressWarnings("unchecked") public static <T> T call(Object obj, String method) { return (T) call(obj, method, new Class[] {}, new Object[] {}); }
ReflectionUtil { @SuppressWarnings("unchecked") public static <T> T call(Object obj, String method) { return (T) call(obj, method, new Class[] {}, new Object[] {}); } }
ReflectionUtil { @SuppressWarnings("unchecked") public static <T> T call(Object obj, String method) { return (T) call(obj, method, new Class[] {}, new Object[] {}); } private  ReflectionUtil(); }
ReflectionUtil { @SuppressWarnings("unchecked") public static <T> T call(Object obj, String method) { return (T) call(obj, method, new Class[] {}, new Object[] {}); } private  ReflectionUtil(); static T newInstance(Class<T> cls); static T newInstance(Class<T> cls, Object... args); static T newInstance(Class<T> cls, Class<?>[] paramTypes, Object... args); static void set(Object obj, String field, Object value); static void setStatic(Class<?> cls, String field, Object value); @SuppressWarnings("unchecked") static T get(Object obj, String field); @SuppressWarnings("unchecked") static T getStatic(Class<?> cls, String field); @SuppressWarnings("unchecked") static T call(Object obj, String method); static T call(Object obj, String method, Object... args); @SuppressWarnings("unchecked") static T call(Object obj, String method, Class<?>[] paramTypes, Object... args); @SuppressWarnings("unchecked") static T callStatic(Class<?> cls, String method); static T callStatic(Class<?> cls, String method, Object... args); @SuppressWarnings("unchecked") static T callStatic(Class<?> cls, String method, Class<?>[] paramTypes,
      Object... args); static Field getField(Class<?> cls, String name); static Method getMethod(Class<?> cls, String name, Class<?>... parameterTypes); }
ReflectionUtil { @SuppressWarnings("unchecked") public static <T> T call(Object obj, String method) { return (T) call(obj, method, new Class[] {}, new Object[] {}); } private  ReflectionUtil(); static T newInstance(Class<T> cls); static T newInstance(Class<T> cls, Object... args); static T newInstance(Class<T> cls, Class<?>[] paramTypes, Object... args); static void set(Object obj, String field, Object value); static void setStatic(Class<?> cls, String field, Object value); @SuppressWarnings("unchecked") static T get(Object obj, String field); @SuppressWarnings("unchecked") static T getStatic(Class<?> cls, String field); @SuppressWarnings("unchecked") static T call(Object obj, String method); static T call(Object obj, String method, Object... args); @SuppressWarnings("unchecked") static T call(Object obj, String method, Class<?>[] paramTypes, Object... args); @SuppressWarnings("unchecked") static T callStatic(Class<?> cls, String method); static T callStatic(Class<?> cls, String method, Object... args); @SuppressWarnings("unchecked") static T callStatic(Class<?> cls, String method, Class<?>[] paramTypes,
      Object... args); static Field getField(Class<?> cls, String name); static Method getMethod(Class<?> cls, String name, Class<?>... parameterTypes);  }