Class AnnotationAccessor.NullAnnotationAccessor

java.lang.Object
cloud.commandframework.annotations.AnnotationAccessor.NullAnnotationAccessor
All Implemented Interfaces:
AnnotationAccessor
Enclosing interface:
AnnotationAccessor

@API(status=INTERNAL, consumers="cloud.commandframework.*", since="1.3.0") public static final class AnnotationAccessor.NullAnnotationAccessor extends Object implements AnnotationAccessor
Annotation accessor that cannot access any annotations
Since:
1.3.0
  • Constructor Details

    • NullAnnotationAccessor

      public NullAnnotationAccessor()
  • Method Details

    • annotation

      public <A extends Annotation> @Nullable A annotation(@NonNull Class<A> clazz)
      Description copied from interface: AnnotationAccessor
      Get an annotation instance, if it's present. If the annotation isn't available, this will return null
      Specified by:
      annotation in interface AnnotationAccessor
      Type Parameters:
      A - Annotation type
      Parameters:
      clazz - Annotation class
      Returns:
      Annotation instance, or null
    • annotations

      public @NonNull Collection<@NonNull Annotation> annotations()
      Description copied from interface: AnnotationAccessor
      Get an immutable collection containing all of the annotations that are accessible using the annotation accessor
      Specified by:
      annotations in interface AnnotationAccessor
      Returns:
      Immutable collection of annotations