| 
HOME | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ireasoning.util.ParseArguments
This class is used to parse the command line arguments.
 Concepts in this class 
 switches: without value, such as -g in javac 
 options: with value, such as -d in javac
 
 Example:
 
 ParseArguments p = new ParseArguments(args, "gO", "d");
 boolean g = p.isSwitchPresent('g');
 String dir = p.getOptionValue('d');
 
| Constructor Summary | |
ParseArguments(String[] args,
               String options)
 | 
|
ParseArguments(String[] args,
               String switches,
               String options)
 | 
|
| Method Summary | |
 String[] | 
getArguments()
Returns an array of 'real' arguememnts, without switches and options.  | 
 String | 
getOptionValue(char option)
Returns the value of an option  | 
 String | 
getOptionValue(char option,
               String defaultVal)
Returns the value of an option  | 
 boolean | 
isSwitchPresent(char switchChar)
Returns true if the passed switch is present  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public ParseArguments(String[] args,
                      String switches,
                      String options)
switches - a string of switchesoptions - a string of options
public ParseArguments(String[] args,
                      String options)
options - a string of options| Method Detail | 
public boolean isSwitchPresent(char switchChar)
public String getOptionValue(char option)
option - the option
public String getOptionValue(char option,
                             String defaultVal)
option - the optiondefaultVal - the default value of the optionpublic String[] getArguments()
  | 
HOME | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||