|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.vivoweb.harvester.util.args.ArgParser
public class ArgParser
Argument Description Listing
| Constructor Summary | |
|---|---|
ArgParser(java.lang.String appName)
Default Constructor |
|
| Method Summary | |
|---|---|
void |
addArgument(ArgDef arg)
Add an Argument Definition to this Argument Parser |
java.lang.String |
getAppName()
Get the application name |
java.util.Collection<ArgDef> |
getArgDefs()
Get the argument definitions |
protected org.apache.commons.cli.Options |
getOptions()
Get the Options |
java.util.Map<java.lang.String,ArgDef> |
getOptMap()
Get the mapping of option flag to ArgDef |
java.lang.String |
getUsage()
Get the usage message for this arg list |
ArgList |
parse(java.lang.String[] args)
Parse the commandline arguments |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArgParser(java.lang.String appName)
appName - the application this parser is meant for| Method Detail |
|---|
protected org.apache.commons.cli.Options getOptions()
public java.util.Collection<ArgDef> getArgDefs()
public java.util.Map<java.lang.String,ArgDef> getOptMap()
public java.lang.String getAppName()
public void addArgument(ArgDef arg)
arg - the argument to add
public ArgList parse(java.lang.String[] args)
throws java.lang.IllegalArgumentException,
java.io.IOException
args - the commandline arguments
java.lang.IllegalArgumentException - bad arguments provided
java.io.IOException - error parsing argspublic java.lang.String getUsage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||