CommanderOption
class CommanderOption(val command: CommanderCommand, val name: String, val aliases: Array<String> = arrayOf(), val shortAlias: Array<String> = arrayOf(), val description: String? = null, val required: Boolean = false, val hasValue: Boolean = false, val defaultValue: String? = null, val valueName: String? = null, val valueDescription: String? = null, val valueValidator: CommanderValueValidator? = null)(source)
A class representing a command line option
Parameters
command
The command this option belongs to
name
The name of the option
aliases
The aliases of the option
shortAlias
The short aliases of the option
description
The description of the option
required
If the option is required
hasValue
If the option has a value
defaultValue
The default value of the option
valueName
The name of the value
valueDescription
The description of the value
valueValidator
The validator of the value
See also
Constructors
Link copied to clipboard
constructor(command: CommanderCommand, name: String, aliases: Array<String> = arrayOf(), shortAlias: Array<String> = arrayOf(), description: String? = null, required: Boolean = false, hasValue: Boolean = false, defaultValue: String? = null, valueName: String? = null, valueDescription: String? = null, valueValidator: CommanderValueValidator? = null)
Creates a new CommanderOption
Properties
Link copied to clipboard
The command this option belongs to
Link copied to clipboard
The default value of the option
Link copied to clipboard
The description of the option
Link copied to clipboard
The short aliases of the option
Link copied to clipboard
The description of the value
Link copied to clipboard
The validator of the value