List<JpsJavaDependenciesEnumerationHandler> (Collection<JpsModule> rootModules) { List<JpsJavaDependenciesEnumerationHandler> handlers = null; for (Factory factory : JpsServiceManager.getInstance().getExtensions(Factory.class)) { JpsJavaDependenciesEnumerationHandler handler = factory.createHandler(rootModules); if (handler != null) { if (handlers == null) { handlers = new SmartList<>(); } handlers.add(handler); } } return handlers; }