code: protected ModuleSorter.Sorted sort(ServletContext context, Set<String> jars) {
          final ModuleSorter sorter = new ModuleSorter();
  
          try {
              _logger.config("There are " + jars.size() + " resource paths");
              ServiceModule.scan(context, jars, new Functor<Void, ServiceModule>() {
                  public Void invoke(ServiceModule module) {
                      sorter.add(module);
                      return null;
                  }
              }, _logger);
          } catch (Exception x) {
              throw new RuntimeException("Failed to sort service modules", x);
          }
  
          return sorter.sort();
      }
docs: /*#
  Detects service modules in a given set of JARs, and returns them in a sorted list.