(ClassLoader loader)
| 58 | } |
| 59 | |
| 60 | private static Set<CliCommand> loadCommands(ClassLoader loader) { |
| 61 | Set<CliCommand> commands = new TreeSet<>(comparing(CliCommand::getName)); |
| 62 | ServiceLoader.load(CliCommand.class, loader).forEach(commands::add); |
| 63 | return commands; |
| 64 | } |
| 65 | |
| 66 | private void showHelp(ClassLoader loader) { |
| 67 | new Help(loadCommands(loader)).configure(out, err).run(); |