Annotation Type Argument
Annotation used to indicate that a method parameter is a command argument
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescription@NonNull StringGet the default value@NonNull StringThe argument description@NonNull StringName of the argument parser@NonNull StringName of the suggestions provider to use.@NonNull StringThe name of the argument that this parameter is bound to.
-
Element Details
-
value
@NonNull String valueThe 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.
- Returns:
- Argument name
- Default:
- "__INFERRED_ARGUMENT_NAME__"
-
parserName
@NonNull String parserNameName of the argument parser- Returns:
- Argument name
- Default:
- ""
-
suggestions
@NonNull String suggestionsName of the suggestions 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, BiFunction). 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 - Since:
- 1.1.0
- Default:
- ""
-
defaultValue
@NonNull String defaultValueGet the default value- Returns:
- Default value
- Default:
- ""
-
description
@NonNull String descriptionThe argument description- Returns:
- Argument description
- Default:
- ""
-