clikt / com.github.ajalt.clikt.parameters.arguments / ArgumentDelegate

ArgumentDelegate

interface ArgumentDelegate<out T> : Argument, ReadOnlyProperty<CliktCommand, T>

An argument that functions as a property delegate

Inherited Properties

help

abstract val help: String

The description of this argument.

name

abstract val name: String

The metavar for this argument.

nvalues

abstract val nvalues: Int

The number of values that this argument takes.

parameterHelp

abstract val parameterHelp: Argument?

Information about this argument for the help output.

required

abstract val required: Boolean

If true, an error will be thrown if this argument is not given on the command line.

Functions

provideDelegate

abstract operator fun provideDelegate(thisRef: CliktCommand, prop: KProperty<*>): ReadOnlyProperty<CliktCommand, T>

Implementations must call CliktCommand.registerArgument

Inherited Functions

finalize

abstract fun finalize(context: Context, values: List<String>): Unit

Called after this command's argv is parsed to transform and store the argument's value.

Inheritors

ProcessedArgument

class ProcessedArgument<AllT, ValueT> : ArgumentDelegate<AllT>

An Argument delegate implementation that transforms its values .