Arguments

open class Arguments

Abstract base class for a class containing a set of command arguments.

Subclass this, and make use of its extension functions in order to specify the commands for your argument. We recommend placing your subclasses within your Extension classes to avoid polluting your namespaces, but they can be wherever you like - as long as they're public.

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

List of Argument objects, which wrap converters.

Link copied to clipboard
open val parseForAutocomplete: Boolean = false

During an autocomplete interaction, whether to try to fill the defined arguments from that event before calling the registered callback.

Functions

Link copied to clipboard
open fun <R : Any> arg(displayName: Key, description: Key, converter: CoalescingConverter<R>): CoalescingConverter<R>

Add a CoalescingConverter argument to this set of arguments.

open fun <R : Any> arg(displayName: Key, description: Key, converter: DefaultingCoalescingConverter<R>): DefaultingCoalescingConverter<R>

Add a DefaultingCoalescingConverter argument to this set of arguments.

open fun <R : Any> arg(displayName: Key, description: Key, converter: DefaultingConverter<R>): DefaultingConverter<R>

Add a DefaultingConverter argument to this set of arguments.

open fun <R : Any> arg(displayName: Key, description: Key, converter: ListConverter<R>): ListConverter<R>

Add a ListConverter argument to this set of arguments.

open fun <R : Any> arg(displayName: Key, description: Key, converter: OptionalCoalescingConverter<R>): OptionalCoalescingConverter<R>

Add an OptionalCoalescingConverter argument to this set of arguments.

open fun <R : Any> arg(displayName: Key, description: Key, converter: OptionalConverter<R>): OptionalConverter<R>

Add an OptionalConverter argument to this set of arguments.

open fun <R : Any> arg(displayName: Key, description: Key, converter: SingleConverter<R>): SingleConverter<R>

Add a SingleConverter argument to this set of arguments.

Link copied to clipboard
open fun validate(locale: Locale)

Validation function that will throw an error if there's a problem with this Arguments class/subclass.