modules/jooby-apitool/src/main/java/org/jooby/apitool/ApiParser.java
public List<RouteMethod> parseFully(String application, List<Route.Definition> routes)
      throws Exception {
    List<RouteMethod> methods = parse(application);

    BiFunction<String, String, OptionalInt> routeIndex = (verb, pattern) -> {
      RouteMethod it = new RouteMethod(verb, pattern, new RouteResponse(void.class));
      return IntStream.range(0, methods.size())
          .filter(i -> methods.get(i).equals(it))
          .findFirst();
    };

    List<RouteMethod> result = new ArrayList<>(routes.size());
    for (Route.Definition route : routes) {
      routeIndex.apply(route.method(), route.pattern())
          .ifPresent(i -> result.add(complement(route, methods.remove(i))));
    }

    customizer.entrySet().forEach(it ->
        result.stream()
            .filter(it.getKey())
            .forEach(it.getValue())
    );

    return result;
  }
public List<RouteMethod> parseFully(String application, List<Route.Definition> routes)
      throws Exception {
    List<RouteMethod> methods = parse(application);

    BiFunction<String, String, OptionalInt> routeIndex = (verb, pattern) -> {
      RouteMethod it = new RouteMethod(verb, pattern, new RouteResponse(void.class));
      return IntStream.range(0, methods.size())
          .filter(i -> methods.get(i).equals(it))
          .findFirst();
    };

    List<RouteMethod> result = new ArrayList<>(routes.size());
    for (Route.Definition route : routes) {
      routeIndex.apply(route.method(), route.pattern())
          .ifPresent(i -> result.add(complement(route, methods.remove(i))));
    }

    customizer.entrySet().forEach(it ->
        result.stream()
            .filter(it.getKey())
            .forEach(it.getValue())
    );

    return result;
  }
public List < RouteMethod > parseFully ( String application , List < Route . Definition > routes ) throws Exception { List < RouteMethod > methods = parse ( application ) ; BiFunction < String , String , OptionalInt > routeIndex = ( verb , pattern ) -> { RouteMethod it = new RouteMethod ( verb , pattern , new RouteResponse ( void . class ) ) ; return IntStream . range ( 0 , methods . size ( ) ) . filter ( i -> methods . get ( i ) . equals ( it ) ) . findFirst ( ) ; } ; List < RouteMethod > result = new ArrayList <> ( routes . size ( ) ) ; for ( Route . Definition route : routes ) { routeIndex . apply ( route . method ( ) , route . pattern ( ) ) . ifPresent ( i -> result . add ( complement ( route , methods . remove ( i ) ) ) ) ; } customizer . entrySet ( ) . forEach ( it -> result . stream ( ) . filter ( it . getKey ( ) ) . forEach ( it . getValue ( ) ) ) ; return result ; }
Parse application bytecode, build route methods from it and merge output with the given routes.

@param application Application to parse.
@param routes Application routes.
@return List of route methods.
@throws Exception If something goes wrong.
Parse application bytecode build route methods from it and merge output with the given routes .