public static class AnnotationList.Empty extends FilterableList.Empty<AnnotationDescription,AnnotationList> implements AnnotationList
AnnotationList.AbstractBase, AnnotationList.Empty, AnnotationList.Explicit, AnnotationList.ForLoadedAnnotations
Constructor and Description |
---|
Empty() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<AnnotationList> |
asList(int length)
Creates a list of empty annotation lists of the given dimension.
|
TypeList |
asTypeList()
Returns a list of the annotation types of this list.
|
AnnotationList |
inherited(java.util.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(java.lang.Class<? extends java.lang.annotation.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 java.lang.annotation.Annotation> |
ofType(java.lang.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 java.lang.annotation.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
public static java.util.List<AnnotationList> asList(int length)
length
- The length of the list.public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.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.public <T extends java.lang.annotation.Annotation> AnnotationDescription.Loadable<T> ofType(java.lang.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.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(java.util.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 java.lang.annotation.RetentionPolicy> matcher)
visibility
in interface AnnotationList
matcher
- A matcher for the required retention policy.public TypeList asTypeList()
asTypeList
in interface AnnotationList