Open
Description
The CommandLinePlugin
give all the CommandLineHandler
to HelpService which extracts CommandLineDescription
.
Then the HelpCommandLineHandler
inject all the CommandLineDescription
and print a well-formated description of all commands or a specific command.
// Internally used by the CommandLinePlugin
class HelpService {
Map<String, CommandLineDescription> extractDescription(List<Class<CommandLineHandler>> classes);
}
class CommandLineDescription {
...
}
class HelpCommandLineHandler {
@Inject
private Map<String, CommandLineDescription> descriptionByCommand;
int call() {
...
}
}