com.google.gwt.util.tools

## Class ArgHandler

- java.lang.Object
- - com.google.gwt.util.tools.ArgHandler

- Direct Known Subclasses:
    ArgHandlerDir, ArgHandlerExtra, ArgHandlerFile, ArgHandlerFlag, ArgHandlerInt, ArgHandlerString

      public abstract class ArgHandler
      extends java.lang.Object

  Base class for command line argument handlers.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ArgHandler()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String[]` | `getDefaultArgs()`
    `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.
    `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` | `isRequired()`
    `boolean` | `isUndocumented()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ArgHandler

          public ArgHandler()

  - ### Method Detail

    - #### getDefaultArgs

          public java.lang.String[] getDefaultArgs()

    - #### getPurpose

          public abstract java.lang.String getPurpose()

    - #### getTag

          public abstract java.lang.String getTag()

    - #### getTagArgs

          public abstract java.lang.String[] getTagArgs()

      A list of words representing the arguments in help text.

    - #### handle

          public abstract int handle(java.lang.String[] args,
                   int tagIndex)

      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()