vertx / io.vertx.kotlin.core.cli / Option

Option

fun Option(argName: String? = null, choices: Iterable<String>? = null, defaultValue: String? = null, description: String? = null, flag: Boolean? = null, help: Boolean? = null, hidden: Boolean? = null, longName: String? = null, multiValued: Boolean? = null, required: Boolean? = null, shortName: String? = null, singleValued: Boolean? = null): Option

A function providing a DSL for building io.vertx.core.cli.Option objects.

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

Parameters

argName - Sets te arg name for this option.

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.

defaultValue - Sets the default value of this option

description - Sets te description of this option.

flag - Configures the current io.vertx.core.cli.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 - Sets whether or not this option is a "help" option

hidden - Sets whether or not this option should be hidden

longName - Sets the long name of this option.

multiValued - Sets whether or not this option can receive several values.

required - Sets whether or not this option is mandatory.

shortName - Sets the short name of this option.

singleValued - Sets whether or not this option can receive a value.