toList

open fun toList(required: Boolean = true, signatureType: Key? = null, showTypeInSignature: Boolean? = null, errorType: Key? = null, nestedValidator: Validator<List<T>> = null): ListConverter<T>

Wrap this single converter with a SingleToListConverter, which is a special converter that will act like a ListConverter using the same logic of this converter.

Your converter should be designed with this pattern in mind. If that's not possible, please override this function and throw an exception in the body.

For more information on the parameters, see Converter.

Parameters

required

Whether command parsing should fail if no arguments could be converted.

signatureType

Optionally, a signature type string to use instead of the one this converter provides.

showTypeInSignature

Optionally, override this converter's setting for showing the type string in a generated command signature.

errorType

Optionally, a longer type string to be shown in errors instead of the one this converter provides.