java.io.Closeable
, java.lang.AutoCloseable
public class MultiCommand extends Command
Modifier and Type | Field | Description |
---|---|---|
protected java.util.Map<java.lang.String,Command> |
subcommands |
description, parser
Constructor | 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 | Description |
---|---|---|
void |
close() |
|
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, 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
.