Package io.github.classgraph
Class FieldInfoList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<T>
-
- io.github.classgraph.PotentiallyUnmodifiableList<T>
-
- io.github.classgraph.InfoList<T>
-
- io.github.classgraph.MappableInfoList<FieldInfo>
-
- io.github.classgraph.FieldInfoList
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<FieldInfo>,java.util.Collection<FieldInfo>,java.util.List<FieldInfo>,java.util.RandomAccess
public class FieldInfoList extends MappableInfoList<FieldInfo>
A list ofFieldInfoobjects.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFieldInfoList.FieldInfoFilterFilter anFieldInfoListusing a predicate mapping anFieldInfoobject to a boolean, producing anotherFieldInfoListfor all items in the list for which the predicate is true.
-
Field Summary
Fields Modifier and Type Field Description (package private) static FieldInfoListEMPTY_LISTAn unmodifiable emptyFieldInfoList.private static longserialVersionUIDserialVersionUID-
Fields inherited from class io.github.classgraph.PotentiallyUnmodifiableList
modifiable
-
-
Constructor Summary
Constructors Constructor Description FieldInfoList()Construct a new modifiable empty list ofFieldInfoobjects.FieldInfoList(int sizeHint)Construct a new modifiable empty list ofFieldInfoobjects, given a size hint.FieldInfoList(java.util.Collection<FieldInfo> fieldInfoCollection)Construct a new modifiable emptyFieldInfoList, given an initial list ofFieldInfoobjects.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FieldInfoListemptyList()Return an unmodifiable emptyFieldInfoList.FieldInfoListfilter(FieldInfoList.FieldInfoFilter filter)Find the subset of theFieldInfoobjects in this list for which the given filter predicate is true.protected voidfindReferencedClassInfo(java.util.Map<java.lang.String,ClassInfo> classNameToClassInfo, java.util.Set<ClassInfo> refdClassInfo, LogNode log)GetClassInfoobjects for any classes referenced in the list.-
Methods inherited from class io.github.classgraph.MappableInfoList
asMap, containsName, get
-
Methods inherited from class io.github.classgraph.InfoList
equals, getAsStrings, getAsStringsWithSimpleNames, getNames, hashCode
-
Methods inherited from class io.github.classgraph.PotentiallyUnmodifiableList
add, add, addAll, addAll, clear, iterator, listIterator, makeUnmodifiable, remove, remove, removeAll, retainAll, set
-
Methods inherited from class java.util.ArrayList
clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, lastIndexOf, listIterator, removeIf, removeRange, replaceAll, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
serialVersionUID- See Also:
- Constant Field Values
-
EMPTY_LIST
static final FieldInfoList EMPTY_LIST
An unmodifiable emptyFieldInfoList.
-
-
Constructor Detail
-
FieldInfoList
public FieldInfoList()
Construct a new modifiable empty list ofFieldInfoobjects.
-
FieldInfoList
public FieldInfoList(int sizeHint)
Construct a new modifiable empty list ofFieldInfoobjects, given a size hint.- Parameters:
sizeHint- the size hint
-
FieldInfoList
public FieldInfoList(java.util.Collection<FieldInfo> fieldInfoCollection)
Construct a new modifiable emptyFieldInfoList, given an initial list ofFieldInfoobjects.- Parameters:
fieldInfoCollection- the collection ofFieldInfoobjects.
-
-
Method Detail
-
emptyList
public static FieldInfoList emptyList()
Return an unmodifiable emptyFieldInfoList.- Returns:
- the unmodifiable empty
FieldInfoList.
-
findReferencedClassInfo
protected void findReferencedClassInfo(java.util.Map<java.lang.String,ClassInfo> classNameToClassInfo, java.util.Set<ClassInfo> refdClassInfo, LogNode log)
GetClassInfoobjects for any classes referenced in the list.- Parameters:
classNameToClassInfo- the map from class name toClassInfo.refdClassInfo- the referenced class infolog- the log
-
filter
public FieldInfoList filter(FieldInfoList.FieldInfoFilter filter)
Find the subset of theFieldInfoobjects in this list for which the given filter predicate is true.- Parameters:
filter- TheFieldInfoList.FieldInfoFilterto apply.- Returns:
- The subset of the
FieldInfoobjects in this list for which the given filter predicate is true.
-
-