gov.llnl.babel
Class SwitchDictionary
java.lang.Object
gov.llnl.babel.SwitchDictionary
- CommandLineDictionary
public class SwitchDictionary
extends java.lang.Object
SwitchDictionary
public SwitchDictionary(boolean multiMode)
addCommandLineSwitch
public void addCommandLineSwitch(CommandLineSwitch cls)
throws NameCollisionException
Add a command line switch to the dictionary of available
command line switches. Babel requires that each command
line switch have a unique long name. Given that short
names are limited, it allocates abbreviated forms on a
first come first served basis.
- addCommandLineSwitch in interface CommandLineDictionary
cls
- a non-null command line switch to add to the dictionary.
executeCommandLineSwitches
public String[] executeCommandLineSwitches(String[] arguments)
throws InvalidOptionException
Execute the command line switches from arguments and return
the unprocessed command line arguments.
arguments
- the command line arguments to execute.
- a non-NULL array containing the remaining unprocessed
arguments (i.e., those arguments that aren't part of a command line
switch).
InvalidOptionException
- when this
exception is thrown, it indicates that the Babel run should be
ended. Assume the error has already been reported to java.lang.System.err
.
executeMultiple
public int executeMultiple(String[] arguments)
getHelpPrinted
public boolean getHelpPrinted()
Return true
iff the help text was printed.
printHelpText
public void printHelpText()