public abstract static class AnnotationList.AbstractBase extends FilterableList.AbstractBase<AnnotationDescription,AnnotationList> implements AnnotationList
AnnotationList.AbstractBase, AnnotationList.Empty, AnnotationList.Explicit, AnnotationList.ForLoadedAnnotations
modCount
Constructor and Description |
---|
AbstractBase() |
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.
|
protected AnnotationList |
wrap(List<AnnotationDescription> values)
Represents a list of values as an instance of this instance's list type.
|
filter, getOnly, subList
add, add, addAll, clear, equals, get, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
filter, getOnly, subList
add, 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, toArray
parallelStream, removeIf, stream
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
isAnnotationPresent
in interface AnnotationList
annotationType
- The type to find in the list.true
if the list contains the annotation type.public boolean isAnnotationPresent(TypeDescription annotationType)
isAnnotationPresent
in interface AnnotationList
annotationType
- The type to find in the list.true
if the list contains the annotation type.@MaybeNull public <T extends Annotation> AnnotationDescription.Loadable<T> ofType(Class<T> annotationType)
ofType
in interface AnnotationList
T
- The annotation type.annotationType
- The type to be found in the list.null
if no such annotation was found.@MaybeNull public AnnotationDescription ofType(TypeDescription annotationType)
ofType
in interface AnnotationList
annotationType
- The type to be found in the list.null
if no such annotation was found.public AnnotationList inherited(Set<? extends TypeDescription> ignoredTypes)
Inherited
as long as they are not
contained by the set of ignored annotation types.inherited
in interface AnnotationList
ignoredTypes
- A list of annotation types to be ignored from the lookup.public AnnotationList visibility(ElementMatcher<? super RetentionPolicy> matcher)
visibility
in interface AnnotationList
matcher
- A matcher for the required retention policy.public TypeList asTypeList()
asTypeList
in interface AnnotationList
public List<String> asTypeNames()
asTypeNames
in interface AnnotationList
protected AnnotationList wrap(List<AnnotationDescription> values)
FilterableList.AbstractBase
wrap
in class FilterableList.AbstractBase<AnnotationDescription,AnnotationList>
values
- The values to wrap in an instance of this list's type.values
.Copyright © 2014–2025. All rights reserved.