code: public static Object invokeMethod(final Object obj, final String methodName, final Class<?> argType,
              final Object param, final boolean throwException) throws IllegalArgumentException {
          if (obj == null || methodName == null) {
              if (throwException) {
                  throw new NullPointerException();
              } else {
                  return null;
              }
          }
          return invokeMethod(obj.getClass(), obj, methodName, true, argType, param, throwException);
      }
docs: Invoke the named method in the given object or its superclasses. If an exception is thrown while trying to
  call the method, and throwException is true, then IllegalArgumentException is thrown wrapping the cause,
  otherwise this will return null. If passed a null object, returns null unless throwException is true, then
  throws IllegalArgumentException.
  
  @param obj
  The object.
  @param methodName
  The method name.
  @param argType
  The type of the method argument.
  @param param
  The parameter value to use when invoking the method.
  @param throwException
  Whether to throw an exception on failure.
  @return The result of the method invocation.
  @throws IllegalArgumentException
  If the method could not be invoked.