docs: private static boolean hasEmptyThrowsClause(Method method) {
          for (Class<?> klass : method.getExceptionTypes()) {
              // Per CTS, callback methods can declare unchecked exceptions on the
              // throws clause.
              if (!RuntimeException.class.isAssignableFrom(klass) &&
                  !Error.class.isAssignableFrom(klass)) {
                  return false;
              }
          }
  
          return true;
      }