|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.babel.UserOptions
public class UserOptions
Manages the
wide variety of settings available to a user. The configuration
options are read in through an array of strings (args). Newly
specified arguments always replace the values of the previously
specified ones with the exception of the repository path where
new arguments are appended to the existing list.
For developers, to add a new internal Babel option. Create an inner
subclass in UserOptions with a name ending in Switch
.
This class uses reflection to automatically add all inner classes
as command line switches.
Constructor Summary | |
---|---|
UserOptions(Context context)
Since this is a singleton class, the constructor is protected. |
|
UserOptions(Context context,
Generator gen)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserOptions(Context context)
public UserOptions(Context context, Generator gen)
Method Detail |
---|
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |