Package org.incendo.cloud.annotations
Annotation Type Flag
Indicates that the parameter should be treated like a
CommandFlag.
- If the parameter is a
boolean, a presence flag will be created - If the parameter is of any other type, a value flag will be created and the parser
will resolve it in the same way that it would for an
Argument
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionFlag aliasesThe argument descriptionName of the parser.The flag permissionbooleanWhether the flag can be repeated.Name of the suggestion provider to use.
-
Element Details
-
value
The flag name- Returns:
- Flag name
-
aliases
Flag aliases- Returns:
- Aliases
- Default:
{""}
-
parserName
Name of the parser. Leave empty to use the default parser for the parameter type- Returns:
- Parser 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:
""
-
permission
The flag permission- Returns:
- Flag permission
- Default:
""
-
repeatable
Whether the flag can be repeated.- Returns:
- whether the flag can be repeated
- Default:
false
-