code: public static void scan(ServletContext c, Set<String> jars, Functor<Void, ServiceModule>collector, Logger logger) {
          for (String j : jars) {
              logger.config("... " + j);
              try (JarInputStream jis = new JarInputStream(j.startsWith("/") ? c.getResourceAsStream(j) : new URL(j).openStream())) {
                  Attributes attrs = jis.getManifest().getMainAttributes();
                  String d = attrs.getValue(DOMAIN_NAME), n = attrs.getValue(MODULE_NAME), s = attrs.getValue(SIMPLE_NAME);
                  if (d != null && n != null && s != null) {
                      collector.invoke(new ServiceModule(d, n, s, attrs.getValue(MODULE_BASE), j));
                  }
              } catch (IOException x) {
                  logger.log(Level.WARNING, "Unexpected error during jar inspection, ignored", x);
              } catch (Exception x) {
                  logger.config("Unknown resource ignored");
              }
          }
      }
docs: Scans a collection of jar files, passing recognized Xillium application modules as ServiceModule objects to
  a collector.
  
  @param c a ServletContext
  @param jars a collection of file or URL paths
  @param collector a Functor that is to be invoked for each recognized Xillium application module
  @param logger a Logger that can be used to log warning messages