Package-level declarations
Types
Link copied to clipboard
A callback that transforms all the values into the final argument type
Link copied to clipboard
An argument that functions as a property delegate
Link copied to clipboard
A receiver for argument transformers.
Link copied to clipboard
A callback validates the final argument type
Link copied to clipboard
A callback that transforms a single value from one type to another
Link copied to clipboard
A callback that transforms a single value from a string to the value type
Link copied to clipboard
An Argument delegate implementation that transforms its values .
Link copied to clipboard
Functions
Link copied to clipboard
fun CliktCommand.argument(name: String = "", help: String = "", helpTags: Map<String, String> = emptyMap(), completionCandidates: CompletionCandidates? = null): RawArgument
Create a property delegate argument.
Link copied to clipboard
inline fun <AllT : Any, ValueT> ProcessedArgument<AllT, ValueT>.check(crossinline lazyMessage: (AllT) -> String = { it.toString() }, crossinline validator: (AllT) -> Boolean): ArgumentDelegate<AllT>
inline fun <AllT : Any, ValueT> ProcessedArgument<AllT, ValueT>.check(message: String, crossinline validator: (AllT) -> Boolean): ArgumentDelegate<AllT>
inline fun <AllT : Any, ValueT> ProcessedArgument<AllT?, ValueT>.check(crossinline lazyMessage: (AllT) -> String = { it.toString() }, crossinline validator: (AllT) -> Boolean): ArgumentDelegate<AllT?>
inline fun <AllT : Any, ValueT> ProcessedArgument<AllT?, ValueT>.check(message: String, crossinline validator: (AllT) -> Boolean): ArgumentDelegate<AllT?>
Check the final argument value and raise an error if it's not valid.
Link copied to clipboard
inline fun <InT : Any, ValueT : Any> ProcessedArgument<InT, InT>.convert(completionCandidates: CompletionCandidates = completionCandidatesWithDefault.default, crossinline conversion: ArgValueConverter<InT, ValueT>): ProcessedArgument<ValueT, ValueT>
Convert the argument's values.
Link copied to clipboard
inline fun <T : Any> ProcessedArgument<T, T>.defaultLazy(crossinline value: () -> T): ArgumentDelegate<T>
inline fun <T : Any> ProcessedArgument<T, T>.defaultLazy(defaultForHelp: String, crossinline value: () -> T): ArgumentDelegate<T>
If the argument is not given, call value and use its return value instead of throwing an error.
Link copied to clipboard
fun <AllInT, ValueT, AllOutT> ProcessedArgument<AllInT, ValueT>.transformAll(nvalues: Int? = null, required: Boolean? = null, transform: ArgCallsTransformer<AllOutT, ValueT>): ProcessedArgument<AllOutT, ValueT>
Transform all values to the final argument type.
fun <AllInT, ValueT, AllOutT> ProcessedArgument<AllInT, ValueT>.transformAll(nvalues: Int?, required: Boolean?, defaultForHelp: String?, transform: ArgCallsTransformer<AllOutT, ValueT>): ProcessedArgument<AllOutT, ValueT>
Link copied to clipboard
fun <AllT : Any, ValueT> ProcessedArgument<AllT, ValueT>.validate(validator: ArgValidator<AllT>): ArgumentDelegate<AllT>
fun <AllT : Any, ValueT> ProcessedArgument<AllT?, ValueT>.validate(validator: ArgValidator<AllT>): ArgumentDelegate<AllT?>
Check the final argument value and raise an error if it's not valid.