Skip to content

ArgumentSpec

extendsParamSpec

A positional parameter, consumed left to right from the non-option arguments.

ParamSpec.kt

Constructors

ArgumentSpec

ArgumentSpec(name: String, converter: Converter<*>, help: String, required: Boolean, multiple: Boolean)
name

the parameter name, shown in help and used as the lookup key in ParsedValues.

converter

converts each raw value to the typed result.

help

help text for --help.

required

whether at least one value must be supplied.

multiple

when true, captures all remaining positionals. At most one parameter per command may set this, and it must be declared last.

ParamSpec.kt

Properties

converter

val converter: Converter<*>
ParamSpec.kt

help

open override val help: String
ParamSpec.kt

multiple

val multiple: Boolean
ParamSpec.kt

name

val name: String
ParamSpec.kt

required

val required: Boolean
ParamSpec.kt

Released under the Apache License 2.0.