Models command line options. Options are values passed to a command line interface using -x or –x. Supported syntaxes depend on the parser.

Short name is generally used with a single dash, while long name requires a double-dash.

  • Option
    • BaseDataObject
    • Basic
      • Identifiable
      • Object
        • Anything

no subtypes hierarchy

Initializer
Option(String? argName = null, {String*}? choices = null, String? defaultValue = null, String? description = null, Boolean? flag = null, Boolean? help = null, Boolean? hidden = null, String? longName = null, Boolean? multiValued = null, String? name = null, Boolean? required = null, String? shortName = null, Boolean? singleValued = null)
Parameters:
  • argName = null

    Sets te arg name for this option.

  • choices = null

    Sets the list of values accepted by this option. If the value set by the user does not match once of these values, a io.vertx.core.cli.InvalidValueException exception is thrown.

  • defaultValue = null

    Sets the default value of this option

  • description = null

    Sets te description of this option.

  • flag = null

    Configures the current Option to be a flag. It will be evaluated to true if it's found in the command line. If you need a flag that may receive a value, use, in this order:

    option.setFlag(true).setSingleValued(true)
    

  • help = null

    Sets whether or not this option is a “help” option

  • hidden = null

    Sets whether or not this option should be hidden

  • longName = null

    Sets the long name of this option.

  • multiValued = null

    Sets whether or not this option can receive several values.

  • name = null
  • required = null

    Sets whether or not this option is mandatory.

  • shortName = null

    Sets the short name of this option.

  • singleValued = null

    Sets whether or not this option can receive a value.

Attributes
argNameshared String? argName

Sets te arg name for this option.

choicesshared {String*}? choices

Sets the list of values accepted by this option. If the value set by the user does not match once of these values, a io.vertx.core.cli.InvalidValueException exception is thrown.

defaultValueshared String? defaultValue

Sets the default value of this option

descriptionshared String? description

Sets te description of this option.

flagshared Boolean? flag

Configures the current Option to be a flag. It will be evaluated to true if it's found in the command line. If you need a flag that may receive a value, use, in this order:

option.setFlag(true).setSingleValued(true)

helpshared Boolean? help

Sets whether or not this option is a “help” option

hiddenshared Boolean? hidden

Sets whether or not this option should be hidden

longNameshared String? longName

Sets the long name of this option.

multiValuedshared Boolean? multiValued

Sets whether or not this option can receive several values.

nameshared String? name
requiredshared Boolean? required

Sets whether or not this option is mandatory.

shortNameshared String? shortName

Sets the short name of this option.

singleValuedshared Boolean? singleValued

Sets whether or not this option can receive a value.

Inherited Attributes
Attributes inherited from: Object
hash, string
Methods
toJsonshared actual default JsonObject toJson()
Refines BaseDataObject.toJson
Inherited Methods
Methods inherited from: Object
equals
Methods inherited from: BaseDataObject
toJson