picard.cmdline

## Annotation Type Option

-     @Retention(value=RUNTIME)
       @Target(value=FIELD)
       @Documented
      public @interface Option

  Used to annotate which fields of a CommandLineProgram are options given at the command line. If a command line call looks like "cmd option=foo x=y bar baz" the CommandLineProgram would have annotations on fields to handle the values of option and x. All options must be in the form name=value on the command line. The java type of the option will be inferred from the type of the field or from the generic type of the collection if this option is allowed more than once. The type must be an enum or have a constructor with a single String parameter.

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `boolean` | `common` Is this an Option common to all command line programs.
    `String` | `doc` Text that appears for this option in text describing usage of the command line program.
    `int` | `maxElements` The maximum number of times this option is allowed.
    `int` | `minElements` The minimum number of times that this option is required.
    `String[]` | `mutex` Array of option names that cannot be used in conjunction with this one.
    `boolean` | `optional` If set to false, an exception will be thrown if the option is not specified.
    `boolean` | `overridable` This boolean determines if this annotation overrides a parent annotation.
    `int` | `printOrder` Overwrite default order in which Option are printed in usage by explicitly setting a print position e.g.
    `String` | `shortName` The name of the option as it would appear on the command line.

- - ### Element Detail

    - #### shortName

          public abstract String shortName

      The name of the option as it would appear on the command line.
      Default:
        ""

  - - #### doc

          public abstract String doc

      Text that appears for this option in text describing usage of the command line program.
      Default:
        ""

  - - #### optional

          public abstract boolean optional

      If set to false, an exception will be thrown if the option is not specified. If 2 options are mutually exclusive and both have optional=false it will be interpreted as one or the other is required and an exception will only be thrown if neither are specified.
      Default:
        false

  - - #### mutex

          public abstract String[] mutex

      Array of option names that cannot be used in conjunction with this one. If 2 options are mutually exclusive and both have optional=false it will be interpreted as one OR the other is required and an exception will only be thrown if neither are specified.
      Default:
        {}

  - - #### minElements

          public abstract int minElements

      The minimum number of times that this option is required.
      Default:
        0

  - - #### maxElements

          public abstract int maxElements

      The maximum number of times this option is allowed.
      Default:
        2147483647

  - - #### common

          public abstract boolean common

      Is this an Option common to all command line programs. If it is then it will only be displayed in usage info when H or STDHELP is used to display usage.
      Default:
        false

  - - #### overridable

          public abstract boolean overridable

      This boolean determines if this annotation overrides a parent annotation. If that is the case then the options of the parent annotation are overridden with this annotation.
      Default:
        false

  - - #### printOrder

          public abstract int printOrder

      Overwrite default order in which Option are printed in usage by explicitly setting a print position e.g. printOrder=1 is printed before printOrder=2. Options without printOrder automatically receive a printOrder that (1) is a multiple of 1000 and (2) reflects the order's default position. This gives you the option to insert your own options between options inherited from super classes (which order you do not control). The default ordering follows (1)the option declaration position in the class and (2) sub-classes options printed before superclass options.
      Default:
        2147483647