public static class AnnotationList.ForLoadedAnnotation extends FilterableList.AbstractBase<AnnotationDescription,AnnotationList> implements AnnotationList
Annotation
s as an annotatoon list.AnnotationList.Empty, AnnotationList.Explicit, AnnotationList.ForLoadedAnnotation
FilterableList.AbstractBase<T,S extends FilterableList<T,S>>
modCount
Constructor and Description |
---|
ForLoadedAnnotation(Annotation... annotation)
Creates a new list of loaded annotations.
|
Modifier and Type | Method and Description |
---|---|
static List<AnnotationList> |
asList(Annotation[][] annotations)
Creates a list of annotation lists representing the given loaded annotations.
|
AnnotationDescription |
get(int index) |
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.
|
int |
size() |
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, 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, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
public ForLoadedAnnotation(Annotation... annotation)
annotation
- The represented annotations.public static List<AnnotationList> asList(Annotation[][] annotations)
annotations
- The annotations to represent where each dimension is converted into a list.public AnnotationDescription get(int index)
get
in interface List<AnnotationDescription>
get
in class AbstractList<AnnotationDescription>
public int size()
size
in interface Collection<AnnotationDescription>
size
in interface List<AnnotationDescription>
size
in class AbstractCollection<AnnotationDescription>
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.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–2015. All rights reserved.