Package io.github.classgraph
Class InfoList<T extends HasName>
- 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>
-
- Type Parameters:
T- the element type
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<T>,java.util.Collection<T>,java.util.List<T>,java.util.RandomAccess
- Direct Known Subclasses:
MappableInfoList,MethodInfoList
public class InfoList<T extends HasName> extends PotentiallyUnmodifiableList<T>
A list of named objects.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static longserialVersionUIDserialVersionUID.-
Fields inherited from class io.github.classgraph.PotentiallyUnmodifiableList
modifiable
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.List<java.lang.String>getAsStrings()Get the String representations of all items in this list, by callingtoString()on each item in the list.java.util.List<java.lang.String>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.java.util.List<java.lang.String>getNames()Get the names of all items in this list, by callinggetName()on each item in the list.inthashCode()-
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
static final long serialVersionUID
serialVersionUID.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InfoList
InfoList()
Constructor.
-
InfoList
InfoList(int sizeHint)
Constructor.- Parameters:
sizeHint- the size hint
-
InfoList
InfoList(java.util.Collection<T> infoCollection)
Constructor.- Parameters:
infoCollection- the initial elements.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
-
hashCode
public int hashCode()
-
getNames
public java.util.List<java.lang.String> 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
public java.util.List<java.lang.String> 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
public java.util.List<java.lang.String> 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,MethodInfoorFieldInfoobject), 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.
-
-