public abstract class CommandHandler extends Object
Constructor and Description |
---|
CommandHandler(String name)
Ctor with default description.
|
CommandHandler(String name,
String description)
CommandHandler ctor.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
execute()
Execute the command from parsed args.
|
String |
getDescription()
Get the description of this command.
|
String |
getName()
Get the name of this command.
|
org.apache.commons.cli.Options |
getOptions()
Options for this command.
|
abstract void |
parse(String[] argv)
Parse this command's options from the command line.
|
void |
printUsage(boolean doExit)
Print usage and (optionally) exit the program.
|
public CommandHandler(String name, String description)
name
- The string that invokes this command.description
- The description of this command.public CommandHandler(String name)
name
- The string that invokes this command.public String getName()
public String getDescription()
public org.apache.commons.cli.Options getOptions()
public void printUsage(boolean doExit)
doExit
- Whether or not to exit after printing usage.public abstract void parse(String[] argv) throws Exception
argv
- Raw options array following after the command string.Exception
Jas4pp 1.5 © Java Analysis Studio for Particle Physics