Package org.incendo.cloud.annotations
Annotation Type Argument
Annotation used to indicate that a method parameter is a command argument.
This annotation is optional if the parameter names are preserved during compilation, and the parameter name matches the corresponding syntax fragment.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe argument descriptionName of the argument parserName of the suggestion provider to use.The name of the argument that this parameter is bound to.
-
Element Details
-
value
The name of the argument that this parameter is bound to. This value must be overridden unless you have explicitly enabled the preservation of parameter names in your compiler options.If the parameter names are preserved and the name of the bound argument is the same as the parameter name, the default value may be used. The mapping between parameter names and argument names can be overridden by supplying a custom
ParameterNameExtractorto aStandardArgumentExtractor.- Returns:
- Argument name
- Default:
"__INFERRED_ARGUMENT_NAME__"
-
parserName
Name of the argument parser- Returns:
- Argument name
- Default:
""
-
suggestions
Name of the suggestion provider to use. If the string is left empty, 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
""if the default suggestion provider for the argument parser should be used instead
- Default:
""
-
description
The argument description- Returns:
- Argument description
- Default:
""
-