Interface AnnotatedArgument<S extends CommandSource>
- All Superinterfaces:
Argument<S>,DescriptionHolder,PermissionHolder
- All Known Implementing Classes:
AnnotationArgumentDecorator
@AvailableSince("1.0.0")
public interface AnnotatedArgument<S extends CommandSource>
extends Argument<S>
Represents an annotated parameter
from using annotation parser
-
Method Summary
Modifier and TypeMethodDescription<A extends Annotation>
AgetAnnotation(Class<A> clazz) Get the instance of specific annotationCollection<? extends Annotation>@NotNull ParseElement<?>default booleanhasAnnotation(Class<? extends Annotation> clazz) Methods inherited from interface studio.mevera.imperat.command.arguments.Argument
addValidator, asAnnotatedArgument, asCommand, asFlagParameter, asNumeric, format, getDefaultValueSupplier, getName, getParent, getPosition, getSuggestionResolver, getValidators, greedyLimit, isAnnotated, isCommand, isFlag, isGreedy, isGreedyString, isNumeric, isOptional, isRequired, setFormat, setParent, setPosition, similarTo, type, validate, valueType, wrappedTypeMethods inherited from interface studio.mevera.imperat.command.DescriptionHolder
describe, describe, getDescriptionMethods inherited from interface studio.mevera.imperat.permissions.PermissionHolder
getPermissionsData, getPrimaryPermission, setPermissionData
-
Method Details
-
getParsedElement
-
getAnnotation
Get the instance of specific annotation- Type Parameters:
A- the valueType of the annotation- Parameters:
clazz- the valueType of annotation- Returns:
- the specific instance of an annotation of a certain valueType AnnotatedArgument
-
hasAnnotation
-
getAnnotations
Collection<? extends Annotation> getAnnotations()- Returns:
- the annotations associated with this parameter
-