Interface ArgumentDescriptor
- All Superinterfaces:
Descriptor
- All Known Implementing Classes:
ImmutableArgumentDescriptor
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a new builder.@Nullable DefaultValue<?, ?> Returns the default value.Returns the description of the argument.name()Returns the argument nameReturns the parameter.Returns the name of the parser to use.Returns the name of the suggestion provider to use.
-
Method Details
-
builder
Creates a new builder.- Returns:
- the created builder
-
parameter
Returns the parameter.- Returns:
- the parameter
-
name
Returns the argument name- Specified by:
namein interfaceDescriptor- Returns:
- the argument name
-
parserName
Returns the name of the parser to use. Ifnullthe default parser for the parameter type will be used.- Returns:
- the parser name, or
null
-
suggestions
Returns the name of the suggestion provider to use. If the string isnull, the default provider for the argument parser will be used. Otherwise, theParserRegistryinstance in theCommandManagerwill be queried for a matching suggestion provider.For this to work, the suggestion needs to be registered in the parser registry. To do this, use
ParserRegistry.registerSuggestionProvider(String, SuggestionProvider). The registry instance can be retrieved usingCommandManager.parserRegistry().- Returns:
- the name of the suggestion provider, or
null
-
defaultValue
@Nullable DefaultValue<?,?> defaultValue()Returns the default value.- Returns:
- the default value, or
null
-
description
@Nullable Description description()Returns the description of the argument.- Returns:
- the argument description, or
null
-