Interface AnnotatedParameter<S extends Source>
- All Superinterfaces:
CommandParameter<S>,DescriptionHolder,PermissionHolder
- All Known Implementing Classes:
AnnotationParameterDecorator
@AvailableSince("1.0.0")
public interface AnnotatedParameter<S extends Source>
extends CommandParameter<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>default booleanhasAnnotation(Class<? extends Annotation> clazz) Methods inherited from interface studio.mevera.imperat.command.parameters.CommandParameter
asAnnotated, asCommand, asFlagParameter, asNumeric, copyWithDifferentPosition, format, getDefaultValueSupplier, getSinglePermission, getSuggestionResolver, isAnnotated, isCommand, isFlag, isGreedy, isGreedyString, isNumeric, isOptional, isRequired, name, parent, parent, position, position, setFormat, setSinglePermission, similarTo, type, valueType, wrappedTypeMethods inherited from interface studio.mevera.imperat.command.DescriptionHolder
describe, describe, descriptionMethods inherited from interface studio.mevera.imperat.command.PermissionHolder
addPermission, getPermissions, hasPermission
-
Method Details
-
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 AnnotatedParameter
-
hasAnnotation
-
getAnnotations
Collection<? extends Annotation> getAnnotations()- Returns:
- the annotations associated with this parameter
-