gov.llnl.babel
Class UserOptions

java.lang.Object
  extended bygov.llnl.babel.UserOptions

public class UserOptions
extends java.lang.Object

UserOptions is a singleton class that 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.


Constructor Summary
protected UserOptions()
          Since this is a singleton class, the constructor is protected.
 
Method Summary
 boolean canProceed()
          Check if the user options indicate processing can continue.
static UserOptions getInstance()
          Return the singleton instance of the user options.
static void main(java.lang.String[] args)
          Used for testing purposes only!
 int parseCommandlineOptions(BabelConfiguration theConfig, java.lang.String[] args)
          Extract options from the command line.
 void printUsage()
          Print the command line options and contact information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserOptions

protected UserOptions()
Since this is a singleton class, the constructor is protected.

Method Detail

getInstance

public static UserOptions getInstance()
Return the singleton instance of the user options. If the user options instance has not yet been created, then it will be created by this call.


parseCommandlineOptions

public int parseCommandlineOptions(BabelConfiguration theConfig,
                                   java.lang.String[] args)
Extract options from the command line.

Parameters:
args - String array of command line arguments.
Returns:
index of the first unused argument. can iterate from this value to 'args.length'.

printUsage

public void printUsage()
Print the command line options and contact information.


canProceed

public boolean canProceed()
Check if the user options indicate processing can continue.


main

public static void main(java.lang.String[] args)
Used for testing purposes only!