Class ArgHandler

java.lang.Object
com.google.gwt.util.tools.ArgHandler
Direct Known Subclasses:
ArgHandlerDir, ArgHandlerEnum, ArgHandlerExtra, ArgHandlerFile, ArgHandlerFlag, ArgHandlerInt, ArgHandlerNoopDeprecatedFlag, ArgHandlerString

public abstract class ArgHandler extends Object
Base class for command line argument handlers.
  • Constructor Details

    • ArgHandler

      public ArgHandler()
  • Method Details

    • getDefaultArgs

      public String[] getDefaultArgs()
    • getPurpose

      public abstract String getPurpose()
    • getTag

      public abstract String getTag()
    • getTags

      public String[] 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

      public String getHelpTag()
      The tag to display in help messages.
    • getTagArgs

      public abstract String[] getTagArgs()
      A list of words representing the arguments in help text.
    • handle

      public abstract int handle(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()
    • isExperimental

      public boolean isExperimental()