public class MultiCommand extends Command
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,Command> |
subcommands |
description, parser
Constructor and Description |
---|
MultiCommand(java.lang.String description,
java.lang.Runnable beforeMain)
Construct the multi-command with the specified command description and runnable to execute before main is invoked.
|
Modifier and Type | Method and Description |
---|---|
protected void |
execute(Terminal terminal,
joptsimple.OptionSet options)
Executes this command.
|
protected void |
printAdditionalHelp(Terminal terminal)
Prints additional help information, specific to the command
|
addShutdownHook, close, exit, main
protected final java.util.Map<java.lang.String,Command> subcommands
public MultiCommand(java.lang.String description, java.lang.Runnable beforeMain)
description
- the multi-command descriptionbeforeMain
- the before-main runnableprotected void printAdditionalHelp(Terminal terminal)
Command
printAdditionalHelp
in class Command
protected void execute(Terminal terminal, joptsimple.OptionSet options) throws java.lang.Exception
Command
UserException
.