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

ArgumentTransformContext

class ArgumentTransformContext : Argument

A receiver for argument transformers.

Constructors

<init>

ArgumentTransformContext(argument: Argument, context: Context)

A receiver for argument transformers.

Properties

argument

val argument: Argument

The argument that was invoked

context

val context: Context

Functions

fail

fun fail(message: String): Nothing

Throw an exception indicating that usage was incorrect.

require

fun require(value: Boolean, lazyMessage: () -> String = { "invalid value" }): Unit

If value is false, call fail with the output of lazyMessage