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(java.util.Collection<? extends T> c) |
boolean |
addAll(int index,
java.util.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(java.lang.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. |
protected void |
findReferencedClassInfo(java.util.Map<java.lang.String,ClassInfo> classNameToClassInfo,
java.util.Set<ClassInfo> refdClassInfo,
LogNode log)
Get
ClassInfo objects for any classes referenced in this list. |
AnnotationInfoList |
getRepeatable(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Get the
Repeatable annotation with the given class, or the empty list if none found. |
AnnotationInfoList |
getRepeatable(java.lang.String name)
Get the
Repeatable annotation with the given name, or the empty list if none found. |
int |
hashCode() |
java.util.Iterator<T> |
iterator() |
java.util.ListIterator<T> |
listIterator() |
T |
remove(int index) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
T |
set(int index,
T element) |
asMap, containsName, getgetAsStrings, getAsStringsWithSimpleNames, getNamesclone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, lastIndexOf, listIterator, removeIf, removeRange, replaceAll, size, sort, spliterator, subList, toArray, toArray, trimToSizepublic 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.protected void findReferencedClassInfo(java.util.Map<java.lang.String,ClassInfo> classNameToClassInfo, java.util.Set<ClassInfo> refdClassInfo, LogNode log)
ClassInfo objects for any classes referenced in this list.classNameToClassInfo - the map from class name to ClassInfo.refdClassInfo - the referenced class infolog - the logpublic 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(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Repeatable annotation with the given class, or the empty list if none found.annotationClass - The class to search for.public AnnotationInfoList getRepeatable(java.lang.String name)
Repeatable annotation with the given name, or the empty list if none found.name - The name to search for.public boolean equals(java.lang.Object obj)
equals in interface java.util.Collection<AnnotationInfo>equals in interface java.util.List<AnnotationInfo>equals in class InfoList<AnnotationInfo>public int hashCode()
hashCode in interface java.util.Collection<AnnotationInfo>hashCode in interface java.util.List<AnnotationInfo>hashCode in class InfoList<AnnotationInfo>public boolean add(T element)
add in interface java.util.Collection<T>add in interface java.util.List<T>add in class java.util.ArrayList<T>public void add(int index,
T element)
add in interface java.util.List<T>add in class java.util.ArrayList<T>public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<T>remove in interface java.util.List<T>remove in class java.util.ArrayList<T>public T remove(int index)
remove in interface java.util.List<T>remove in class java.util.ArrayList<T>public boolean addAll(java.util.Collection<? extends T> c)
addAll in interface java.util.Collection<T>addAll in interface java.util.List<T>addAll in class java.util.ArrayList<T>public boolean addAll(int index,
java.util.Collection<? extends T> c)
addAll in interface java.util.List<T>addAll in class java.util.ArrayList<T>public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<T>removeAll in interface java.util.List<T>removeAll in class java.util.ArrayList<T>public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<T>retainAll in interface java.util.List<T>retainAll in class java.util.ArrayList<T>public void clear()
clear in interface java.util.Collection<T>clear in interface java.util.List<T>clear in class java.util.ArrayList<T>public T set(int index,
T element)
set in interface java.util.List<T>set in class java.util.ArrayList<T>public java.util.Iterator<T> iterator()
iterator in interface java.lang.Iterable<T>iterator in interface java.util.Collection<T>iterator in interface java.util.List<T>iterator in class java.util.ArrayList<T>public java.util.ListIterator<T> listIterator()
listIterator in interface java.util.List<T>listIterator in class java.util.ArrayList<T>