| 
 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--net.sourceforge.jsrvany.util.CommandLineParser
This accepts command line arguments in the form "-option parameter" or just "parameter" and provides a number of methods to retrive them for use
Copyright (c) 1998 Damian Fauth
 usage       : java CommandLineParser [options]
 example     : java CommandLineParser -filename "wooz.txt" -message "Hello"
 Note that this class is really to be used by other applications. As a standalone application it will simply
 echo the options it is provided with
 note: '-' is used to distinguish an option on the command line
       e.g. -user username
 
| Constructor Summary | |
| CommandLineParser(java.lang.String[] args)constructor - accepts String[] from main | |
| Method Summary | |
|  int | count(java.lang.String option)count the number of parameters submitted with this option | 
|  java.util.Enumeration | enumerate()Enumerate all options and parameters | 
|  java.util.Enumeration | enumerateKeys()Enumerate all options | 
|  java.lang.String | get(java.lang.String option)Gets the first parameter for a particular option | 
|  java.util.Enumeration | getEnumeration(java.lang.String option)Gets enumeration of all parameters associated with a particular option | 
|  java.lang.String[] | getStringArray(java.lang.String option)Gets enumeration of all parameters associated with a particular option | 
| static void | main(java.lang.String[] args)main entry point - mainly for development and testing | 
| Methods inherited from class java.lang.Object | 
| clone, 
equals, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
toString, 
wait, 
wait, 
wait | 
| Constructor Detail | 
public CommandLineParser(java.lang.String[] args)
| Method Detail | 
public static void main(java.lang.String[] args)
public int count(java.lang.String option)
option - the option namepublic java.util.Enumeration enumerate()
public java.util.Enumeration enumerateKeys()
public java.lang.String get(java.lang.String option)
                     throws java.util.NoSuchElementException
option - the option
public java.util.Enumeration getEnumeration(java.lang.String option)
                                     throws java.util.NoSuchElementException
option - the option
public java.lang.String[] getStringArray(java.lang.String option)
                                  throws java.util.NoSuchElementException
option - the option| 
 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||