|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdsto.dfc.commandline.CmdLineParser
public class CmdLineParser
Vaguely GNU-compatible command-line options parser. Has short (-v) and long-form (--verbose) option support, and also allows options with associated values (-d 2, --debug 2, --debug=2).
Constructor Summary | |
---|---|
CmdLineParser()
|
Method Summary | |
---|---|
void |
addOption(Option opt)
Add an option as one of the possible legal options to use. |
Option[] |
getOptions()
Get an array of all the possible options. |
String[] |
getRemainingArgs()
Return the arguments that do not correspond to a particular option. |
void |
parse(String[] argv)
This is the meat of the command line parser. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CmdLineParser()
Method Detail |
---|
public final void addOption(Option opt)
opt
- The option to be added as a legal Optionpublic final Option[] getOptions()
public final String[] getRemainingArgs()
public void parse(String[] argv) throws IllegalOptionValueException, UnknownOptionException
argv
- The array of strings that you want parsed.
IllegalOptionValueException
UnknownOptionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |