code: @Internal
      public static Method getRequiredInternalMethod(Class type, String name, Class... argumentTypes) {
          try {
              return type.getDeclaredMethod(name, argumentTypes);
          } catch (NoSuchMethodException e) {
              return findMethod(type, name, argumentTypes)
                  .orElseThrow(() -> newNoSuchMethodInternalError(type, name, argumentTypes));
          }
      }
docs: Finds an internal method defined by the Micronaut API and throws a {@link NoSuchMethodError} if it doesn't exist.
  
  @param type          The type
  @param name          The name
  @param argumentTypes The argument types
  @return An {@link Optional} contains the method or empty
  @throws NoSuchMethodError If the method doesn't exist