gov.llnl.babel
public class UserOptions extends java.lang.Object implements CommandLineExtension
Switch
.
This class uses reflection to automatically add all inner classes
as command line switches.Constructor and Description |
---|
UserOptions(Context context)
Since this is a singleton class, the constructor is protected.
|
UserOptions(Context context,
Generator gen) |
Modifier and Type | Method and Description |
---|---|
int |
getNumRequired()
Return the number of required elements on the command line.
|
boolean |
getVersionPrinted()
Return
true iff the version option appeared and it
was printed. |
void |
registerCommandLineSwitches(CommandLineDictionary dict)
This method should register all command line switches in the
dictionary.
|
void |
reset() |
public UserOptions(Context context)
public void registerCommandLineSwitches(CommandLineDictionary dict) throws NameCollisionException
CommandLineExtension
registerCommandLineSwitches
in interface CommandLineExtension
dict
- the command line switch dictionary in which you register
your command line extensions.NameCollisionException
- If your extension doesn't know what to do with the exception
thrown by calls to CommandLineDictionary.addCommandLineSwitch(gov.llnl.babel.cli.CommandLineSwitch)
,
you can let Babel handle it.public void reset()
public int getNumRequired()
public boolean getVersionPrinted()
true
iff the version option appeared and it
was printed.