|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.util.tools.ArgHandler com.google.gwt.util.tools.ArgHandlerFlag
public abstract class ArgHandlerFlag
Argument handler for boolean flags that have no parameters. Supports toggling the boolean value on and off using -label and -nolabel tag variants and calculating a meaningful purpose including default value.
Constructor Summary | |
---|---|
ArgHandlerFlag()
|
Method Summary | |
---|---|
protected void |
addTagValue(java.lang.String tag,
boolean value)
|
abstract boolean |
getDefaultValue()
Returns the default value that will appear in help messages. |
java.lang.String |
getHelpTag()
The tag to display in help messages. |
java.lang.String |
getLabel()
The root String that will be munged into -label and -nolabel variants for flag value toggling. |
java.lang.String |
getPurpose()
|
abstract java.lang.String |
getPurposeSnippet()
Returns a description that will be mixed together with default value to come up with the overall flag purpose. |
java.lang.String |
getTag()
The primary tag matched by this argument handler. |
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. |
(package private) boolean |
getValueByTag(java.lang.String tag)
|
int |
handle(java.lang.String[] args,
int startIndex)
Attempts to process one flag or "extra" command-line argument (that appears without a flag). |
boolean |
isRequired()
|
abstract boolean |
setFlag(boolean value)
Takes the explicitly provided value and propagates it into whatever option settings this flag controls. |
Methods inherited from class com.google.gwt.util.tools.ArgHandler |
---|
getDefaultArgs, isExperimental, isUndocumented |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArgHandlerFlag()
Method Detail |
---|
protected void addTagValue(java.lang.String tag, boolean value)
public abstract boolean getDefaultValue()
public java.lang.String getHelpTag()
ArgHandler
getHelpTag
in class ArgHandler
public java.lang.String getLabel()
public final java.lang.String getPurpose()
getPurpose
in class ArgHandler
public abstract java.lang.String getPurposeSnippet()
public final java.lang.String getTag()
getTag
in class ArgHandler
public java.lang.String[] getTagArgs()
ArgHandler
getTagArgs
in class ArgHandler
public final java.lang.String[] getTags()
ArgHandler
getTags
in class ArgHandler
boolean getValueByTag(java.lang.String tag)
public int handle(java.lang.String[] args, int startIndex)
ArgHandler
handle
in class ArgHandler
args
- the arguments passed in to main()startIndex
- 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()
isRequired
in class ArgHandler
public abstract boolean setFlag(boolean value)
value
- the new value for the flag.
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |