public interface RefAnnotated
| Modifier and Type | Method and Description |
|---|---|
<A extends Annotation> |
getAnnotation(@NotNull Class<A> annotationClass)
gets the annotation from the given annotation class.
|
default <A extends Annotation> |
getAnnotation(@NotNull Class<A> annotationClass,
@NotNull Consumer<A> consumer)
gets the annotation from the given annotation class and if it's found runs the consumer.
|
default <A extends Annotation> |
hasAnnotation(@NotNull Class<A> annotationClass)
checks if
this has the given annotation. |
<A extends Annotation> Optional<A> getAnnotation(@NotNull @NotNull Class<A> annotationClass)
A - the annotation type.annotationClass - the annotation class to get.this have the given
annotation class.default <A extends Annotation> void getAnnotation(@NotNull @NotNull Class<A> annotationClass, @NotNull @NotNull Consumer<A> consumer)
A - the annotation type.annotationClass - the annotation class to getconsumer - the consumer to run.default <A extends Annotation> boolean hasAnnotation(@NotNull @NotNull Class<A> annotationClass)
this has the given annotation.A - the annotation type.annotationClass - the annotation class to check.true if this has the given annotation.Copyright © 2021. All rights reserved.