docs: private static Object invokeMethod(final Class<?> cls, final Object obj, final String methodName,
              final boolean oneArg, final Class<?> argType, final Object param, final boolean throwException)
              throws IllegalArgumentException {
          Method method = null;
          final List<Class<?>> reverseAttemptOrder = getReverseMethodAttemptOrder(cls);
          for (int i = reverseAttemptOrder.size() - 1; i >= 0; i--) {
              final Class<?> classOrInterface = reverseAttemptOrder.get(i);
              try {
                  method = oneArg ? classOrInterface.getDeclaredMethod(methodName, argType)
                          : classOrInterface.getDeclaredMethod(methodName);
                  // Method found
                  break;
              } catch (final ReflectiveOperationException | SecurityException e) {
                  // Try next interface or superclass 
              }
          }
          if (method == null) {
              if (throwException) {
                  throw new IllegalArgumentException((obj == null ? "Static method " : "Method ") + "\"" + methodName
                          + "\" not found or not accesible");
              }
          } else {
              try {
                  method.setAccessible(true);
              } catch (final RuntimeException e) { // JDK 9+: InaccessibleObjectException | SecurityException
                  // Ignore
              }
              try {
                  return oneArg ? method.invoke(obj, param) : method.invoke(obj);
              } catch (final IllegalAccessException e) {
                  if (throwException) {
                      throw new IllegalArgumentException(
                              "Can't call " + (obj == null ? "static " : "") + "method \"" + methodName + "\": " + e);
                  }
              } catch (final InvocationTargetException e) {
                  if (throwException) {
                      throw new IllegalArgumentException("Exception while invoking " + (obj == null ? "static " : "")
                              + "method \"" + methodName + "\"", e);
                  }
              }
          }
          return null;
      }