public interface Command
Modifier and Type | Field and Description |
---|---|
static String |
global |
static String |
missingFileError |
Modifier and Type | Method and Description |
---|---|
CommandState |
execute(CommandState inputState,
String[] args)
All commands offer an execute method that can be chained from previous commands.
|
String |
getDescription()
Brief description of the command.
|
String |
getName()
Name of the command.
|
org.apache.commons.cli.Options |
getOptions()
Command-line options for the command.
|
String |
getUsage()
Command-line usage for the command.
|
void |
main(String[] args)
All commands can be call from the Java command line with an array of strings as arguments.
|
static final String global
static final String missingFileError
String getName()
String getDescription()
String getUsage()
org.apache.commons.cli.Options getOptions()
void main(String[] args)
args
- strings to use as argumentsCommandState execute(CommandState inputState, String[] args) throws Exception
inputState
- the input from the previous command, or nullargs
- the command-line argumentsException
- on any problemCopyright © 2015–2020. All rights reserved.