ConfigurationPrinter.java

public class ConfigurationPrinter { public void printLayer(final Configuration configuration) { sortedModules(configuration.modules()).forEach(module -> { System.out.println(module.name()); printModule(module); System.out.println(""); }); } private void printModule(final ResolvedModule module) { sortedModules(module.reads()) .forEach(m -> System.out.println("|--" + m.name())); } private List<ResolvedModule> sortedModules(final Set<ResolvedModule> modules) { return modules .stream() .sorted(Comparator.comparing(ResolvedModule::name)) .collect(Collectors.toList()); } public static void main(final String[] args) { final Configuration configuration = Configuration.resolve( ModuleFinder.of(Paths.get(args[0])), List.of(Configuration.empty()), ModuleFinder.ofSystem(), List.of("io.vividcode.store.runtime") ); new ConfigurationPrinter().printLayer(configuration); } }
Printing Out the Readability Graph

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.