public static class AnnotationList.Empty extends FilterableList.Empty<AnnotationDescription,AnnotationList> implements AnnotationList
AnnotationList.AbstractBase, AnnotationList.Empty, AnnotationList.Explicit, AnnotationList.ForLoadedAnnotation
modCount
Constructor and Description |
---|
Empty() |
Modifier and Type | Method and Description |
---|---|
static List<AnnotationList> |
asList(int length)
Creates a list of empty annotation lists of the given dimension.
|
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.
|
AnnotationList |
visibility(ElementMatcher<? super RetentionPolicy> matcher)
Only retains annotations with the given retention policy.
|
filter, get, getOnly, size, subList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, 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 static List<AnnotationList> asList(int length)
length
- The length of the list.public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
AnnotationList
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)
AnnotationList
isAnnotationPresent
in interface AnnotationList
annotationType
- The type to find in the list.true
if the list contains the annotation type.public <T extends Annotation> AnnotationDescription.Loadable<T> ofType(Class<T> annotationType)
AnnotationList
ofType
in interface AnnotationList
T
- The annotation type.annotationType
- The type to be found in the list.null
if no such annotation was found.public AnnotationList inherited(Set<? extends TypeDescription> ignoredTypes)
AnnotationList
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)
AnnotationList
visibility
in interface AnnotationList
matcher
- A matcher for the required retention policy.Copyright © 2014–2015. All rights reserved.