ArgumentBuilder

Builds a positional argument, named after the property it is assigned to. The call you end with decides the property's type:

  • end here and the argument is required and non-null;

  • optional makes it nullable, resolving to null when absent;

  • multiple captures all remaining positionals into a List<T>.

Refine the value type (.int(), .enum<E>(), .convert(...)) before choosing cardinality.

Type Parameters

T

the argument's value type.

Functions

Link copied to clipboard
fun <R : Any> convert(converter: Converter<R>): ArgumentBuilder<R>
Link copied to clipboard
Link copied to clipboard
inline fun <E : Enum<E>> enum(): ArgumentBuilder<E>

Parses the value as the enum E, matching constant names case-insensitively.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Captures all remaining positionals into a List<T>. Must be the last argument declared.

Link copied to clipboard

Makes the argument optional; it resolves to null when absent.

Link copied to clipboard
open operator override fun provideDelegate(thisRef: Arguments, property: KProperty<*>): ReadOnlyProperty<Arguments, T>