- All Known Implementing Classes:
AnnotationCollector.NoAnnotations,AnnotationCollector.OneAnnotation,AnnotationCollector.TwoAnnotations,AnnotationMap
public interface Annotations
Interface that defines interface for accessing contents of a
collection of annotations. This is needed when introspecting
annotation-based features from different kinds of things, not
just objects that Java Reflection interface exposes.
Standard mutable implementation is AnnotationMap
-
Method Summary
Modifier and TypeMethodDescription<A extends Annotation>
AMain access method used to find value for given annotation.booleanhas(Class<? extends Annotation> cls) booleanhasOneOf(Class<? extends Annotation>[] annoClasses) intsize()Returns number of annotation entries in this collection.values()Access method that returns a stream of all annotations contained.
-
Method Details
-
get
Main access method used to find value for given annotation. -
values
Stream<Annotation> values()Access method that returns a stream of all annotations contained.- Since:
- 3.0
-
has
-
hasOneOf
-
size
int size()Returns number of annotation entries in this collection.
-