CommandArgumentContext

interface CommandArgumentContext

指令参数环境, 即 CommandValueArgumentParser 的集合, 用于 CompositeCommandSimpleCommand.

在指令解析时, 总是从 CommandArgumentContextAware.context 搜索相关解析器

要构造 CommandArgumentContext, 参考 buildCommandArgumentContext

See also

Types

Link copied to clipboard
object Builtins : CommandArgumentContext
Link copied to clipboard
object Companion
Link copied to clipboard
data class ParserPair<T : Any>(val klass: KClass<T>, val parser: CommandValueArgumentParser<T>)

Functions

Link copied to clipboard
abstract operator fun <T : Any> get(kClass: KClass<T>): CommandValueArgumentParser<T>?

获取一个 kClass 类型的解析器.

Link copied to clipboard
abstract fun toList(): List<CommandArgumentContext.ParserPair<*>>

Inheritors

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

Extensions

Link copied to clipboard
operator fun CommandArgumentContext.plus(replacer: CommandArgumentContext): CommandArgumentContext

合并两个 buildCommandArgumentContext, replacer 将会替换 this 中重复的 parser.

operator fun CommandArgumentContext.plus(replacer: List<CommandArgumentContext.ParserPair<*>>): CommandArgumentContext

合并 thisreplacer, replacer 将会替换 this 中重复的 parser.