Package io.github.qishr.cascara.common.util
Class HelpCommand
java.lang.Object
io.github.qishr.cascara.common.util.CommandLine.HelpCommand
All Implemented Interfaces:
IHelpCommandInitializable, IHelpCommandInitializable2, Runnable, Callable<Integer>
Enclosing Class:
io.github.qishr.cascara.common.util.CommandLine
public static final class HelpCommand
Help command that can be installed as a subcommand on all application commands.When invoked with a subcommand argument, it prints usage help for the specified subcommand. For example:
// print help for subcommand command help subcommand
When invoked without additional parameters, it prints usage help for the parent command. For example:
// print help for command command help
For Messages: this command has a --help option with descriptionKey = "helpCommand.help",
and a COMMAND positional parameter with descriptionKey = "helpCommand.command".
Constructor Summary
| Constructor | Description |
|---|---|
| HelpCommand() |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| public void | run() | Invokes #usage(PrintStream, Help.ColorScheme) for the specified command, or for the parent command. |
| public Integer | call() | |
| public void | init(CommandLine helpCommandLine, Ansi ansi, PrintStream out, PrintStream err) | |
| public void | init(CommandLine helpCommandLine, ColorScheme colorScheme, PrintWriter out, PrintWriter err) |
Method Details
run
public void run()
Invokes #usage(PrintStream, Help.ColorScheme) for the specified command, or for the parent command.
Specified By:
call
public Integer call()
Specified By:
init
public void init(CommandLine helpCommandLine, Ansi ansi, PrintStream out, PrintStream err)
Deprecation
This has been marked as deprecated.
Specified By:
init
public void init(CommandLine helpCommandLine, ColorScheme colorScheme, PrintWriter out, PrintWriter err)
Specified By: