Package io.github.classgraph
Class InfoList<T extends HasName>
java.lang.Object
java.util.AbstractCollection<T>
java.util.AbstractList<T>
java.util.ArrayList<T>
io.github.classgraph.PotentiallyUnmodifiableList<T>
io.github.classgraph.InfoList<T>
- Type Parameters:
T
- the element type
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<T>
,Collection<T>
,List<T>
,RandomAccess
,SequencedCollection<T>
- Direct Known Subclasses:
MappableInfoList
,MethodInfoList
A list of named objects.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final long
serialVersionUID.Fields inherited from class io.github.classgraph.PotentiallyUnmodifiableList
modifiable
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorsConstructorDescriptionInfoList()
Constructor.InfoList
(int sizeHint) Constructor.InfoList
(Collection<T> infoCollection) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the String representations of all items in this list, by callingtoString()
on each item in the list.Get the String representations of all items in this list, using only simple names of any named classes, by callingScanResultObject#toStringWithSimpleNames()
if the object is a subclass ofScanResultObject
(e.g.getNames()
Get the names of all items in this list, by callinggetName()
on each item in the list.int
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
addFirst, addLast, clone, contains, ensureCapacity, forEach, get, getFirst, getLast, indexOf, isEmpty, lastIndexOf, listIterator, removeFirst, removeIf, removeLast, removeRange, replaceAll, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface java.util.List
containsAll, reversed
-
Field Details
-
serialVersionUID
static final long serialVersionUIDserialVersionUID.- See Also:
-
-
Constructor Details
-
InfoList
InfoList()Constructor. -
InfoList
InfoList(int sizeHint) Constructor.- Parameters:
sizeHint
- the size hint
-
InfoList
InfoList(Collection<T> infoCollection) Constructor.- Parameters:
infoCollection
- the initial elements.
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
getNames
Get the names of all items in this list, by callinggetName()
on each item in the list.- Returns:
- The names of all items in this list, by calling
getName()
on each item in the list.
-
getAsStrings
Get the String representations of all items in this list, by callingtoString()
on each item in the list.- Returns:
- The String representations of all items in this list, by calling
toString()
on each item in the list.
-
getAsStringsWithSimpleNames
Get the String representations of all items in this list, using only simple names of any named classes, by callingScanResultObject#toStringWithSimpleNames()
if the object is a subclass ofScanResultObject
(e.g.ClassInfo
,MethodInfo
orFieldInfo
object), otherwise callingtoString()
, for each item in the list.- Returns:
- The String representations of all items in this list, using only the simple names of any named classes.
-