Package io.github.fastclasspathscanner
Class FieldInfoList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<FieldInfo>
-
- io.github.fastclasspathscanner.FieldInfoList
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<FieldInfo>
,Collection<FieldInfo>
,List<FieldInfo>
,RandomAccess
public class FieldInfoList extends ArrayList<FieldInfo>
A list ofFieldInfo
objects.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
FieldInfoList.FieldInfoFilter
Filter anFieldInfoList
using a predicate mapping anFieldInfo
object to a boolean, producing anotherFieldInfoList
for all items in the list for which the predicate is true.
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description FieldInfoList()
FieldInfoList(int sizeHint)
FieldInfoList(Collection<FieldInfo> fieldInfoCollection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsName(String fieldName)
Return true if this list contains a field with the given name.FieldInfoList
filter(FieldInfoList.FieldInfoFilter filter)
Find the subset of theFieldInfo
objects in this list for which the given filter predicate is true.FieldInfo
get(String fieldName)
Return theFieldInfo
object in the list with the given name, or null if not found.List<String>
getAsStrings()
Get the string representations of all fields in this list (with annotations, modifiers, etc.), by callingFieldInfo.toString()
on each item in the list.List<String>
getNames()
Get the names of all fields in this list.-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from class java.util.AbstractList
equals, hashCode
-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from interface java.util.Collection
parallelStream, stream
-
Methods inherited from interface java.util.List
containsAll, equals, hashCode
-
-
-
-
Constructor Detail
-
FieldInfoList
public FieldInfoList()
-
FieldInfoList
public FieldInfoList(int sizeHint)
-
FieldInfoList
public FieldInfoList(Collection<FieldInfo> fieldInfoCollection)
-
-
Method Detail
-
getAsStrings
public List<String> getAsStrings()
Get the string representations of all fields in this list (with annotations, modifiers, etc.), by callingFieldInfo.toString()
on each item in the list.
-
containsName
public boolean containsName(String fieldName)
Return true if this list contains a field with the given name.
-
get
public FieldInfo get(String fieldName)
Return theFieldInfo
object in the list with the given name, or null if not found.
-
filter
public FieldInfoList filter(FieldInfoList.FieldInfoFilter filter)
Find the subset of theFieldInfo
objects in this list for which the given filter predicate is true.- Parameters:
filter
- TheFieldInfoList.FieldInfoFilter
to apply.- Returns:
- The subset of the
FieldInfo
objects in this list for which the given filter predicate is true.
-
-