Package gw.lang.gosuc

Class GosucArg

java.lang.Object
gw.lang.gosuc.GosucArg

public class GosucArg extends Object
  • Field Details

    • PROJECT

      public static final GosucArg PROJECT
    • PARSER

      public static final GosucArg PARSER
    • ARGS

      public static final GosucArg[] ARGS
    • _name

      private String _name
    • _value

      private String _value
    • _desc

      private String _desc
    • _bRequired

      private boolean _bRequired
    • _bFlag

      private boolean _bFlag
    • _bMatched

      private boolean _bMatched
    • _error

      private String _error
  • Constructor Details

    • GosucArg

      public GosucArg(boolean bRequired, boolean bFlag, String name, String desc)
  • Method Details

    • getName

      public String getName()
    • getValue

      public String getValue()
    • setValue

      public void setValue(String value)
    • isRequired

      public boolean isRequired()
    • isFlag

      public boolean isFlag()
    • getDescription

      public String getDescription()
    • isMatched

      public boolean isMatched()
    • setMatched

      void setMatched(boolean bMatched)
    • getError

      public String getError()
    • setError

      public void setError(String error)
    • hasError

      public boolean hasError()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • match

      private int match(String[] args)
      Parameters:
      args - the arguments in the command line with the consumed ones removed from the beginning
      Returns:
      the number of args consumed
    • parseArgs

      public static String parseArgs(String[] args)