inlineClassOptionVararg

fun TextOptionRegistry.inlineClassOptionVararg(declaredName: String, clazz: KClass<*>, amount: Int, requiredAmount: Int, optionNameSupplier: (Int) -> String, block: TextCommandOptionBuilder.(Int) -> Unit = {})(source)

Declares multiple input options encapsulated in an inline class.

The object contained by the inline class must be a List where the element type is supported by a TextParameterResolver.

Parameters

declaredName

Name of the declared parameter which receives the value class

clazz

The inline class type

amount

How many options to generate

requiredAmount

How many of the generated options are required

optionNameSupplier

Block generating an option name from the option's index

See also


inline fun <T : Any> TextOptionRegistry.inlineClassOptionVararg(declaredName: String, amount: Int, requiredAmount: Int, noinline optionNameSupplier: (Int) -> String, noinline block: TextCommandOptionBuilder.(Int) -> Unit = {})(source)

Declares multiple input options encapsulated in an inline class.

The object contained by the inline class must be a List where the element type is supported by a TextParameterResolver.

Parameters

declaredName

Name of the declared parameter which receives the value class

amount

How many options to generate

requiredAmount

How many of the generated options are required

optionNameSupplier

Block generating an option name from the option's index

T

The inline class type

See also