Class AnnotationAccessor.NullAnnotationAccessor
java.lang.Object
cloud.commandframework.annotations.AnnotationAccessor.NullAnnotationAccessor
- All Implemented Interfaces:
AnnotationAccessor
- Enclosing interface:
- AnnotationAccessor
public static final class AnnotationAccessor.NullAnnotationAccessor
extends Object
implements AnnotationAccessor
Annotation accessor that cannot access any annotations
- Since:
- 1.3.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface cloud.commandframework.annotations.AnnotationAccessor
AnnotationAccessor.NullAnnotationAccessor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<A extends Annotation>
@Nullable Aannotation(@NonNull Class<A> clazz)
Get an annotation instance, if it's present.@NonNull Collection<@NonNull Annotation>
Get an immutable collection containing all of the annotations that are accessible using the annotation accessor
-
Constructor Details
-
NullAnnotationAccessor
public NullAnnotationAccessor()
-
-
Method Details
-
annotation
Description copied from interface:AnnotationAccessor
Get an annotation instance, if it's present. If the annotation isn't available, this will returnnull
- Specified by:
annotation
in interfaceAnnotationAccessor
- Type Parameters:
A
- Annotation type- Parameters:
clazz
- Annotation class- Returns:
- Annotation instance, or
null
-
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 interfaceAnnotationAccessor
- Returns:
- Immutable collection of annotations
-