interface OptionDelegate<out T> : Option, ReadOnlyProperty<CliktCommand, T>
An option that functions as a property delegate
abstract val help: String
The description of this option, usually a single line. |
|
abstract val hidden: Boolean
If true, this option should not appear in help output. |
|
abstract val metavar: String?
A name representing the values for this option that can be displayed to the user. |
|
abstract val names: Set<String>
The names that can be used to invoke this option. They must start with a punctuation character. |
|
abstract val nvalues: Int
The number of values that must be given to this option. |
|
open val parameterHelp: Option?
Information about this option for the help output. |
|
abstract val parser: OptionParser
The parser for this option's values. |
|
abstract val secondaryNames: Set<String>
Names that can be used for a secondary purpose, like disabling flag options. |
abstract operator fun provideDelegate(thisRef: CliktCommand, prop: KProperty<*>): ReadOnlyProperty<CliktCommand, T>
Implementations must call CliktCommand.registerOption |
abstract fun finalize(context: Context, invocations: List<Invocation>): Unit
Called after this command's argv is parsed to transform and store the option's value. |
class FlagOption<T> : OptionDelegate<T>
An Option that has no values. |
|
class OptionWithValues<AllT, EachT, ValueT> : OptionDelegate<AllT>
An Option that takes one or more values. |