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 Type
    Method
    Description
    <A extends Annotation>
    A
    getAnnotation(@NotNull Class<A> annotation)
    Returns the annotation present on this command from the annotation type
    boolean
    hasAnnotation(@NotNull Class<? extends Annotation> annotation)
    Whether this command has the specified annotation or not
  • Method Details

    • getAnnotation

      <A extends Annotation> A getAnnotation(@NotNull @NotNull Class<A> annotation)
      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

      boolean hasAnnotation(@NotNull @NotNull Class<? extends Annotation> annotation)
      Whether this command has the specified annotation or not
      Parameters:
      annotation - The annotation type
      Returns:
      true if it has the annotation, false if otherwise.