Skip to content

FlagSpec

extendsParamSpec

A named boolean parameter whose presence means true.

ParamSpec.kt

Constructors

FlagSpec

FlagSpec(names: List<String>, help: String, negationNames: List<String>, default: Boolean)
names

the flag's names, primary first, for example ["--verbose", "-v"].

help

help text for --help.

negationNames

names that set the flag to false, for example ["--no-verbose"].

default

the value used when neither a name nor a negation name is present.

ParamSpec.kt

Properties

default

val default: Boolean
ParamSpec.kt

help

open override val help: String
ParamSpec.kt

names

val names: List<String>
ParamSpec.kt

negationNames

val negationNames: List<String>
ParamSpec.kt

primaryName

val primaryName: String

The first of names, used as the lookup key in ParsedValues.

ParamSpec.kt

Released under the Apache License 2.0.