public interface AnnotationList extends FilterableList<AnnotationDescription,AnnotationList>
| Modifier and Type | Interface and Description |
|---|---|
static class |
AnnotationList.AbstractBase
An abstract base implementation of an annotation list.
|
static class |
AnnotationList.Empty
Represents an empty annotation list.
|
static class |
AnnotationList.Explicit
Represents a list of explicitly provided annotation descriptions.
|
static class |
AnnotationList.ForLoadedAnnotations
Describes an array of loaded
Annotations as an annotation list. |
| Modifier and Type | Method and Description |
|---|---|
TypeList |
asTypeList()
Returns a list of the annotation types of this list.
|
List<String> |
asTypeNames()
Returns a list of the names of the annotation types.
|
AnnotationList |
inherited(Set<? extends TypeDescription> ignoredTypes)
Returns only annotations that are marked as
Inherited as long as they are not
contained by the set of ignored annotation types. |
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationType)
Checks if this list contains an annotation of the given type.
|
boolean |
isAnnotationPresent(TypeDescription annotationType)
Checks if this list contains an annotation of the given type.
|
<T extends Annotation> |
ofType(Class<T> annotationType)
Finds the first annotation of the given type and returns it.
|
AnnotationDescription |
ofType(TypeDescription annotationType)
Finds the first annotation of the given type and returns it.
|
AnnotationList |
visibility(ElementMatcher<? super RetentionPolicy> matcher)
Only retains annotations with the given retention policy.
|
filter, getOnly, subListadd, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, toArray, toArrayparallelStream, removeIf, streamboolean isAnnotationPresent(Class<? extends Annotation> annotationType)
annotationType - The type to find in the list.true if the list contains the annotation type.boolean isAnnotationPresent(TypeDescription annotationType)
annotationType - The type to find in the list.true if the list contains the annotation type.@MaybeNull <T extends Annotation> AnnotationDescription.Loadable<T> ofType(Class<T> annotationType)
T - The annotation type.annotationType - The type to be found in the list.null if no such annotation was found.AnnotationDescription ofType(TypeDescription annotationType)
annotationType - The type to be found in the list.null if no such annotation was found.AnnotationList inherited(Set<? extends TypeDescription> ignoredTypes)
Inherited as long as they are not
contained by the set of ignored annotation types.ignoredTypes - A list of annotation types to be ignored from the lookup.AnnotationList visibility(ElementMatcher<? super RetentionPolicy> matcher)
matcher - A matcher for the required retention policy.TypeList asTypeList()
Copyright © 2014–2025. All rights reserved.