Annotation Type Option


@Retention(RUNTIME) @Target(FIELD) public @interface Option
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    An array of allowed command line parameters (e.g.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
    int
    How many parameter values this option will consume.
    A description of this option.
    boolean
    If true, this parameter won't appear in the usage().
    boolean
    Whether this option is required.
    Name used to identify the option value in documentation and error messages.
    Is this a command, group or global option
  • Element Details

    • type

      Is this a command, group or global option
      Default:
      COMMAND
    • title

      String title
      Name used to identify the option value in documentation and error messages.
      Default:
      ""
    • name

      String[] name
      An array of allowed command line parameters (e.g. "-n", "--name", etc...).
    • description

      String description
      A description of this option.
      Default:
      ""
    • required

      boolean required
      Whether this option is required.
      Default:
      false
    • arity

      int arity
      How many parameter values this option will consume. For example, an arity of 2 will allow "-pair value1 value2".
      Default:
      -2147483648
    • hidden

      boolean hidden
      If true, this parameter won't appear in the usage().
      Default:
      false
    • allowedValues

      String[] allowedValues
      Default:
      {}