public class SwitchDictionary extends java.lang.Object implements CommandLineDictionary
| Constructor and Description |
|---|
SwitchDictionary(boolean multiMode) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCommandLineSwitch(CommandLineSwitch cls)
Add a command line switch to the dictionary of available
command line switches.
|
java.lang.String[] |
executeCommandLineSwitches(java.lang.String[] arguments)
Execute the command line switches from arguments and return
the unprocessed command line arguments.
|
int |
executeMultiple(java.lang.String[] arguments) |
boolean |
getHelpPrinted()
Return
true iff the help text was printed. |
void |
printHelpText() |
public boolean getHelpPrinted()
true iff the help text was printed.public void addCommandLineSwitch(CommandLineSwitch cls) throws NameCollisionException
addCommandLineSwitch in interface CommandLineDictionarycls - a non-null command line switch to add to the dictionary.NameCollisionException - this indicates
that cls has the same long name as a
CommandLineSwitch already in the dictionary.
This exception is never generated due to collisions in the
short form.public void printHelpText()
public java.lang.String[] executeCommandLineSwitches(java.lang.String[] arguments)
throws InvalidOptionException
arguments - the command line arguments to execute.InvalidOptionException - when this
exception is thrown, it indicates that the Babel run should be
ended. Assume the error has already been reported to System.err.public int executeMultiple(java.lang.String[] arguments)