Package com.google.gwt.util.tools
Class ArgHandlerExtra
- java.lang.Object
-
- com.google.gwt.util.tools.ArgHandler
-
- com.google.gwt.util.tools.ArgHandlerExtra
-
public abstract class ArgHandlerExtra extends ArgHandler
Argument handler that handles arguments that do not have preceding flags.
-
-
Constructor Summary
Constructors Constructor Description ArgHandlerExtra()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
addExtraArg(java.lang.String arg)
Processes the given "extra" argument.java.lang.String
getTag()
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()
-
Methods inherited from class com.google.gwt.util.tools.ArgHandler
getDefaultArgs, getHelpTag, getPurpose, getTagArgs, getTags, isExperimental, isUndocumented
-
-
-
-
Method Detail
-
addExtraArg
public abstract boolean addExtraArg(java.lang.String arg)
Processes the given "extra" argument.- Returns:
- false to abort the command and print a usage error.
-
getTag
public final java.lang.String getTag()
- Specified by:
getTag
in classArgHandler
-
handle
public int handle(java.lang.String[] args, int startIndex)
Description copied from class:ArgHandler
Attempts to process one flag or "extra" command-line argument (that appears without a flag).- Specified by:
handle
in classArgHandler
- Parameters:
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.- 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()
- Overrides:
isRequired
in classArgHandler
-
-