public class AnnotationInfoList extends MappableInfoList<AnnotationInfo>
AnnotationInfo
objects.Modifier and Type | Class and Description |
---|---|
static interface |
AnnotationInfoList.AnnotationInfoFilter
Filter an
AnnotationInfoList using a predicate mapping an AnnotationInfo object to a boolean,
producing another AnnotationInfoList for all items in the list for which the predicate is true. |
Constructor and Description |
---|
AnnotationInfoList()
Construct a new modifiable empty list of
AnnotationInfo objects. |
AnnotationInfoList(AnnotationInfoList reachableAnnotations)
Construct a new modifiable empty
AnnotationInfoList , given an initial list of AnnotationInfo
objects. |
AnnotationInfoList(int sizeHint)
Construct a new modifiable empty list of
AnnotationInfo objects, given a size hint. |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
T element) |
boolean |
add(T element) |
boolean |
addAll(Collection<? extends T> c) |
boolean |
addAll(int index,
Collection<? extends T> c) |
void |
clear() |
AnnotationInfoList |
directOnly()
returns the list of direct annotations, excluding meta-annotations.
|
static AnnotationInfoList |
emptyList()
Return an unmodifiable empty
AnnotationInfoList . |
boolean |
equals(Object obj) |
AnnotationInfoList |
filter(AnnotationInfoList.AnnotationInfoFilter filter)
Find the subset of the
AnnotationInfo objects in this list for which the given filter predicate is
true. |
AnnotationInfoList |
getRepeatable(Class<? extends Annotation> annotationClass)
Get the
Repeatable annotation with the given class, or the empty list if none found. |
AnnotationInfoList |
getRepeatable(String name)
Get the
Repeatable annotation with the given name, or the empty list if none found. |
int |
hashCode() |
Iterator<T> |
iterator() |
ListIterator<T> |
listIterator() |
T |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
T |
set(int index,
T element) |
asMap, containsName, get
getAsStrings, getAsStringsWithSimpleNames, getNames
clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, lastIndexOf, listIterator, removeIf, replaceAll, size, sort, spliterator, subList, toArray, toArray, trimToSize
containsAll, toString
containsAll
parallelStream, stream
public AnnotationInfoList()
AnnotationInfo
objects.public AnnotationInfoList(int sizeHint)
AnnotationInfo
objects, given a size hint.sizeHint
- the size hintpublic AnnotationInfoList(AnnotationInfoList reachableAnnotations)
AnnotationInfoList
, given an initial list of AnnotationInfo
objects.reachableAnnotations
- the reachable annotationspublic static AnnotationInfoList emptyList()
AnnotationInfoList
.AnnotationInfoList
.public AnnotationInfoList filter(AnnotationInfoList.AnnotationInfoFilter filter)
AnnotationInfo
objects in this list for which the given filter predicate is
true.filter
- The AnnotationInfoList.AnnotationInfoFilter
to apply.AnnotationInfo
objects in this list for which the given filter predicate is
true.public AnnotationInfoList directOnly()
AnnotationInfoList
consists of class annotations, i.e. if it was produced using `ClassInfo#getAnnotationInfo()`, then the
returned list also excludes annotations inherited from a superclass or implemented interface that was
meta-annotated with @Inherited
.public AnnotationInfoList getRepeatable(Class<? extends Annotation> annotationClass)
Repeatable
annotation with the given class, or the empty list if none found.annotationClass
- The class to search for.public AnnotationInfoList getRepeatable(String name)
Repeatable
annotation with the given name, or the empty list if none found.name
- The name to search for.public boolean equals(Object obj)
equals
in interface Collection<AnnotationInfo>
equals
in interface List<AnnotationInfo>
equals
in class InfoList<AnnotationInfo>
public int hashCode()
hashCode
in interface Collection<AnnotationInfo>
hashCode
in interface List<AnnotationInfo>
hashCode
in class InfoList<AnnotationInfo>
public boolean add(T element)
public void add(int index, T element)
public boolean remove(Object o)
public T remove(int index)
public boolean addAll(Collection<? extends T> c)
public boolean addAll(int index, Collection<? extends T> c)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public void clear()
public T set(int index, T element)
public Iterator<T> iterator()
public ListIterator<T> listIterator()
listIterator
in interface List<T>
listIterator
in class ArrayList<T>
Copyright © 2021. All rights reserved.