Skip to content

Option

Declares a value-bearing named option on a Command constructor parameter.

The parameter's type determines the converter (String, Int, Long, Double, Boolean, an enum, or List<T> of those for a repeatable option). Optionality:

  • a non-nullable type with no default is required;

  • a nullable type is optional, resolving to null when absent;

  • a default is optional, parsed via the parameter's converter when the option is absent.

Option.kt

Properties

default

val default: String
Option.kt

help

val help: String
Option.kt

names

val names: Array<String>
Option.kt

Released under the Apache License 2.0.