vertx / io.vertx.core.cli.annotations / Argument

Argument

@Target([AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER]) class Argument

Annotates a setter to be called with the value of a command line argument.

Author
Clement Escoffier

See Also
Option

Constructors

<init>

Argument(argName: String, index: Int, required: Boolean)

Annotates a setter to be called with the value of a command line argument.

Properties

argName

val argName: String

The name of this argument (used in doc)

index

val index: Int

The (0-based) position of this argument relative to the argument list. The first parameter has the index 0, the second 1... Index is mandatory to force you to think to the order.

required

val required: Boolean

Whether or not the argument is required. An argument is required by default.