Comparator<FrameworkSupportInModuleProvider> (final List<? extends FrameworkSupportInModuleProvider> types) { DFSTBuilder<FrameworkSupportInModuleProvider> builder = new DFSTBuilder<>(GraphGenerator.generate(CachingSemiGraph.cache(new ProvidersGraph(types)))); if (!builder.isAcyclic()) { Map.Entry<FrameworkSupportInModuleProvider, FrameworkSupportInModuleProvider> pair = builder.getCircularDependency(); LOG.error("Circular dependency between types '" + pair.getKey().getFrameworkType().getId() + "' and '" + pair.getValue().getFrameworkType().getId() + "' was found."); } return builder.comparator(); }