@Test public void invoke() throws NoSuchMethodException { final Method getName = getClass().getDeclaredMethod("getName", new Class[]{}); this.name = "invoke"; assertEquals("invoke", BeanHelper.invoke(this, getName)); }
public static Object invoke(final Object obj, final Method method) { return invoke(obj, method, null); }
BeanHelper { public static Object invoke(final Object obj, final Method method) { return invoke(obj, method, null); } }
BeanHelper { public static Object invoke(final Object obj, final Method method) { return invoke(obj, method, null); }  }
BeanHelper { public static Object invoke(final Object obj, final Method method) { return invoke(obj, method, null); }  static void enterTestMode(); static void exitTestMode(); static String determinePropertyName(final Method method); static Method determineGetter(final Class<?> clazz, final String fieldname); static Annotation[] getDeclaredAnnotations(final Class<?> clazz, final String fieldname); static Method determineGetter(final Class<?> clazz, final String fieldname, final boolean onlyPublicGetter); static List<Method> getAllGetterMethods(final Class<?> clazz); static List<Method> getAllGetterMethods(final Class<?> clazz, final boolean includingSuperClasses); static String getProperty(final Method method); static Class<?> determinePropertyType(final Method method); static Method determineSetter(final Class<?> clazz, final String fieldname); static Method determineSetter(final Class<?> clazz, final Method method); static void invokeSetter(final Object obj, final Method method, final Object value); static Object invoke(final Object obj, final Method method); static Object invoke(final Object obj, final Method method, final Object[] args); static Object newInstance(final String className); static Object newInstance(final Class<?> clazz); static Object newInstance(final Class<?> clazz, final Class<?> paramType, final Object param); static Object newInstance(final Class<?> clazz, final Class<?> paramType1, final Class<?> paramType2,
      final Object param1,
      final Object param2); static Object newInstance(final Class<?> clazz, final Class<?>[] paramTypes, final Object... params); static Object invoke(final Object obj, final Method method, final Object arg); static Field[] getAllDeclaredFields(Class<?> clazz); static Field getDeclaredField(Class<?> clazz, String fieldname); static Method[] getAllDeclaredMethods(Class<?> clazz); static Object getProperty(final Object bean, final String property); static Object setProperty(final Object bean, final String property, final Object value); static Object getIndexedProperty(final Object bean, final String property); static Object getNestedProperty(final Object bean, final String property); static Field[] getDeclaredPropertyFields(final Class<?> clazz); static Object getFieldValue(final Object obj, final Class<?> clazz, final String fieldname); static Object getFieldValue(final Object obj, final Field field); static boolean copyProperties(final Object src, final Object dest, final String... properties); @SuppressWarnings("unchecked") static boolean copyProperties(final Object src, final Object dest, final boolean whitespaceEqualsNull,
      final String... properties); }
BeanHelper { public static Object invoke(final Object obj, final Method method) { return invoke(obj, method, null); }  static void enterTestMode(); static void exitTestMode(); static String determinePropertyName(final Method method); static Method determineGetter(final Class<?> clazz, final String fieldname); static Annotation[] getDeclaredAnnotations(final Class<?> clazz, final String fieldname); static Method determineGetter(final Class<?> clazz, final String fieldname, final boolean onlyPublicGetter); static List<Method> getAllGetterMethods(final Class<?> clazz); static List<Method> getAllGetterMethods(final Class<?> clazz, final boolean includingSuperClasses); static String getProperty(final Method method); static Class<?> determinePropertyType(final Method method); static Method determineSetter(final Class<?> clazz, final String fieldname); static Method determineSetter(final Class<?> clazz, final Method method); static void invokeSetter(final Object obj, final Method method, final Object value); static Object invoke(final Object obj, final Method method); static Object invoke(final Object obj, final Method method, final Object[] args); static Object newInstance(final String className); static Object newInstance(final Class<?> clazz); static Object newInstance(final Class<?> clazz, final Class<?> paramType, final Object param); static Object newInstance(final Class<?> clazz, final Class<?> paramType1, final Class<?> paramType2,
      final Object param1,
      final Object param2); static Object newInstance(final Class<?> clazz, final Class<?>[] paramTypes, final Object... params); static Object invoke(final Object obj, final Method method, final Object arg); static Field[] getAllDeclaredFields(Class<?> clazz); static Field getDeclaredField(Class<?> clazz, String fieldname); static Method[] getAllDeclaredMethods(Class<?> clazz); static Object getProperty(final Object bean, final String property); static Object setProperty(final Object bean, final String property, final Object value); static Object getIndexedProperty(final Object bean, final String property); static Object getNestedProperty(final Object bean, final String property); static Field[] getDeclaredPropertyFields(final Class<?> clazz); static Object getFieldValue(final Object obj, final Class<?> clazz, final String fieldname); static Object getFieldValue(final Object obj, final Field field); static boolean copyProperties(final Object src, final Object dest, final String... properties); @SuppressWarnings("unchecked") static boolean copyProperties(final Object src, final Object dest, final boolean whitespaceEqualsNull,
      final String... properties);  }