Package com.google.gwt.util.tools
Class ArgHandler
java.lang.Object
com.google.gwt.util.tools.ArgHandler
- Direct Known Subclasses:
ArgHandlerDir
,ArgHandlerEnum
,ArgHandlerExtra
,ArgHandlerFile
,ArgHandlerFlag
,ArgHandlerInt
,ArgHandlerNoopDeprecatedFlag
,ArgHandlerString
Base class for command line argument handlers.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionString[]
The tag to display in help messages.abstract String
abstract String
getTag()
abstract String[]
A list of words representing the arguments in help text.String[]
getTags()
The set of tags matched by this argument handler.abstract int
Attempts to process one flag or "extra" command-line argument (that appears without a flag).boolean
boolean
boolean
-
Constructor Details
-
ArgHandler
public ArgHandler()
-
-
Method Details
-
getDefaultArgs
-
getPurpose
-
getTag
-
getTags
The set of tags matched by this argument handler. By default includes just the one primary tag mentioned in getTag() but can be overridden to provide broader matching. -
getHelpTag
The tag to display in help messages. -
getTagArgs
A list of words representing the arguments in help text. -
handle
Attempts to process one flag or "extra" command-line argument (that appears without a flag).- Parameters:
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.- Returns:
- the number of additional arguments consumed, not including the flag or extra argument. Alternately, returns -1 if the argument cannot be used. This will causes the program to abort and usage to be displayed.
-
isRequired
public boolean isRequired() -
isUndocumented
public boolean isUndocumented() -
isExperimental
public boolean isExperimental()
-