com.vgrs.xcode.cmdline
Class CommandLineArgs
java.lang.Object
com.vgrs.xcode.cmdline.CommandLineArgs
public class CommandLineArgs
- extends java.lang.Object
Collect command line arguments into a set of data structures which are easy
to interrogate.
Usage:
- Key, value pairs are separated by an equals sign. You can have hyphens
prior to the argument.
- runreport date=6/4/1975 --version=1.5
- The single hyphen indicates a set of switches. Each character in the
argument is its own switch. Commonly used in the unix tar command.
- The 'f' switch is special. It can be followed by a file name which will
be associated with the switch. (see above)
- The double hyphen indicates a standalone flag.
- Author:
- jcolosi
|
Method Summary |
java.lang.String |
get(java.lang.String aOption)
|
int |
getCount()
|
java.util.Set<java.lang.String> |
getOptionSet()
|
java.util.List<java.lang.String> |
getUnassigned()
|
boolean |
has(java.lang.String aOption)
|
void |
parse(java.lang.String[] aArgs)
|
void |
reset()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CommandLineArgs
public CommandLineArgs()
CommandLineArgs
public CommandLineArgs(java.lang.String[] aArgs)
get
public java.lang.String get(java.lang.String aOption)
getUnassigned
public java.util.List<java.lang.String> getUnassigned()
has
public boolean has(java.lang.String aOption)
parse
public void parse(java.lang.String[] aArgs)
reset
public void reset()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getCount
public int getCount()
getOptionSet
public java.util.Set<java.lang.String> getOptionSet()
Copyright © 2000-2010 VeriSign Inc. All Rights Reserved