code: public static Object applyMethod(Object pObject, String pMethod, Object ... pArgs) {
          Class<?> clazz = pObject.getClass();
          try {
              Method method = extractMethod(pMethod, clazz, pArgs);
              return method.invoke(pObject,pArgs);
          } catch (NoSuchMethodException e) {
              throw new IllegalArgumentException("Cannot call method " + pMethod + " on " + pObject + ": " + e,e);
          } catch (InvocationTargetException e) {
              throw new IllegalArgumentException("Cannot call method " + pMethod + " on " + pObject + ": " + e,e);
          } catch (IllegalAccessException e) {
              throw new IllegalArgumentException("Cannot call method " + pMethod + " on " + pObject + ": " + e,e);
          }
      }
docs: Apply a method to a given object with optional arguments. The method is looked up the whole class
  hierarchy.
  
  @param pObject object on which to apply the method
  @param pMethod the method name
  @param pArgs optional arguments
  @return return value (if any)