public abstract class Command
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
description
A description of the command, used in the help output.
|
protected joptsimple.OptionParser |
parser
The option parser for this command.
|
Constructor and Description |
---|
Command(java.lang.String description) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
execute(Terminal terminal,
joptsimple.OptionSet options)
Executes this command.
|
protected static void |
exit(int status) |
int |
main(java.lang.String[] args,
Terminal terminal)
Parses options for this command from args and executes it.
|
protected void |
printAdditionalHelp(Terminal terminal)
Prints additional help information, specific to the command
|
protected final java.lang.String description
protected final joptsimple.OptionParser parser
public final int main(java.lang.String[] args, Terminal terminal) throws java.lang.Exception
java.lang.Exception
protected void printAdditionalHelp(Terminal terminal)
protected static void exit(int status)