code: public static Object invokeMethod(final Object obj, final String methodName, final boolean throwException)
              throws IllegalArgumentException {
          if (obj == null || methodName == null) {
              if (throwException) {
                  throw new NullPointerException();
              } else {
                  return null;
              }
          }
          return invokeMethod(obj.getClass(), obj, methodName, false, null, null, 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 throwException
  If true, throw an exception if the field value could not be read.
  @return The field value.
  @throws IllegalArgumentException
  If the field value could not be read.