public abstract class ArgHandler
extends java.lang.Object
Constructor and Description |
---|
ArgHandler() |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getDefaultArgs() |
java.lang.String |
getHelpTag()
The tag to display in help messages.
|
abstract java.lang.String |
getPurpose() |
abstract java.lang.String |
getTag() |
abstract java.lang.String[] |
getTagArgs()
A list of words representing the arguments in help text.
|
java.lang.String[] |
getTags()
The set of tags matched by this argument handler.
|
abstract int |
handle(java.lang.String[] args,
int tagIndex)
Attempts to process one flag or "extra" command-line argument (that appears
without a flag).
|
boolean |
isExperimental() |
boolean |
isRequired() |
boolean |
isUndocumented() |
public java.lang.String[] getDefaultArgs()
public abstract java.lang.String getPurpose()
public abstract java.lang.String getTag()
public java.lang.String[] getTags()
public java.lang.String getHelpTag()
public abstract java.lang.String[] getTagArgs()
public abstract int handle(java.lang.String[] args, int tagIndex)
args
- the arguments passed in to main()tagIndex
- an index into args indicating the first argument to use.
If this is a handler for a flag argument. Otherwise it's the index of the
"extra" argument.public boolean isRequired()
public boolean isUndocumented()
public boolean isExperimental()