public abstract class ArgHandler extends Object
Constructor and Description |
---|
ArgHandler() |
Modifier and Type | Method and Description |
---|---|
String[] |
getDefaultArgs() |
String |
getHelpTag()
The tag to display in help messages.
|
abstract String |
getPurpose() |
abstract String |
getTag() |
abstract String[] |
getTagArgs()
A list of words representing the arguments in help text.
|
String[] |
getTags()
The set of tags matched by this argument handler.
|
abstract int |
handle(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 String[] getDefaultArgs()
public abstract String getPurpose()
public abstract String getTag()
public String[] getTags()
public String getHelpTag()
public abstract String[] getTagArgs()
public abstract int handle(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()
Copyright © 2018. All rights reserved.