Package revxrsal.commands.command.trait
Interface CommandAnnotationHolder
- All Known Subinterfaces:
CommandParameter
,ExecutableCommand
public interface CommandAnnotationHolder
Represents a command component that contains annotations, such as a parameter.
-
Method Summary
Modifier and TypeMethodDescription<A extends Annotation>
AgetAnnotation
(@NotNull Class<A> annotation) Returns the annotation present on this command from the annotation typeboolean
hasAnnotation
(@NotNull Class<? extends Annotation> annotation) Whether this command has the specified annotation or not
-
Method Details
-
getAnnotation
Returns the annotation present on this command from the annotation type- Parameters:
annotation
- The annotation type- Returns:
- The annotation value, or null if not present.
-
hasAnnotation
Whether this command has the specified annotation or not- Parameters:
annotation
- The annotation type- Returns:
- true if it has the annotation, false if otherwise.
-