io.vertx.core.cli.annotations

## Annotation Type Option

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

  Annotates a setter to be called with the value of a command line option. Setter have been preferred to field to allow validation.

  The cardinality of the option is detected from the single method parameter type: arrays, list and set can receive several values.
  Author:
    Clement Escoffier
  See Also:
    `Argument`

- - ### Field Summary

    Fields
    Modifier and Type | Fields and Description
    --- | ---
    `static String` | `NO_NAME`

  - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `boolean` | `acceptMultipleValues` Whether or not the option accept multiple values.
    `boolean` | `acceptValue` Whether or not the option accept a value.
    `String` | `argName` The name of this argument (used in doc)
    `String[]` | `choices` The set of choices accepted as values by this option.
    `boolean` | `flag` Whether or not the option can be used as a flag (meaning no value)
    `boolean` | `help` Whether or not this option is a "Help" option.
    `String` | `longName` The name of the option (without the `--` prefix).
    `boolean` | `required` Whether or not the option is required.
    `String` | `shortName` The short option name (without the `-` prefix).

- - ### Field Detail

    - #### NO_NAME

          public static final String NO_NAME

  - ### Element Detail

    - #### longName

          public abstract String longName

      The name of the option (without the `--` prefix). Defaults to a name based on the setter name
      Default:
        "\u0000"

  - - #### shortName

          public abstract String shortName

      The short option name (without the `-` prefix). If not given the option has no short name.
      Default:
        "\u0000"

  - - #### argName

          public abstract String argName

      The name of this argument (used in doc)
      Default:
        "value"

  - - #### required

          public abstract boolean required

      Whether or not the option is required.
      Default:
        false

  - - #### acceptValue

          public abstract boolean acceptValue

      Whether or not the option accept a value. If the setter accepts an array, a list, a set, or a collection as parameter, it automatically detect it accepts multiple values.
      Default:
        true

  - - #### acceptMultipleValues

          public abstract boolean acceptMultipleValues

      Whether or not the option accept multiple values. If the setter accepts an array, a list, a set, or a collection as parameter, it automatically detect it accepts multiple values.
      Default:
        false

  - - #### flag

          public abstract boolean flag

      Whether or not the option can be used as a flag (meaning no value)
      Default:
        false

  - - #### help

          public abstract boolean help

      Whether or not this option is a "Help" option. Help options are generally flag.
      Default:
        false

  - - #### choices

          public abstract String[] choices

      The set of choices accepted as values by this option. No need to call this methods for enums.
      Default:
        {}

Copyright © 2016. All rights reserved.