Package io.github.fastclasspathscanner
Class MethodInfoList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<MethodInfo>
-
- io.github.fastclasspathscanner.MethodInfoList
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<MethodInfo>
,Collection<MethodInfo>
,List<MethodInfo>
,RandomAccess
public class MethodInfoList extends ArrayList<MethodInfo>
A list ofMethodInfo
objects.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
MethodInfoList.MethodInfoFilter
Filter anMethodInfoList
using a predicate mapping anMethodInfo
object to a boolean, producing anotherMethodInfoList
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 MethodInfoList()
MethodInfoList(int sizeHint)
MethodInfoList(Collection<MethodInfo> methodInfoCollection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsName(String methodName)
Return true if this list contains a method with the given name.MethodInfoList
filter(MethodInfoList.MethodInfoFilter filter)
Find the subset of theMethodInfo
objects in this list for which the given filter predicate is true.MethodInfo
get(String methodName)
Return theMethodInfo
object in the list with the given name, or null if not found.List<String>
getAsStrings()
Get the string representations of all methods in this list (with annotations, modifiers, params, etc.), by callingMethodInfo.toString()
on each item in the list.List<String>
getNames()
Get the names of all methods 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
-
MethodInfoList
public MethodInfoList()
-
MethodInfoList
public MethodInfoList(int sizeHint)
-
MethodInfoList
public MethodInfoList(Collection<MethodInfo> methodInfoCollection)
-
-
Method Detail
-
getAsStrings
public List<String> getAsStrings()
Get the string representations of all methods in this list (with annotations, modifiers, params, etc.), by callingMethodInfo.toString()
on each item in the list.
-
containsName
public boolean containsName(String methodName)
Return true if this list contains a method with the given name.
-
get
public MethodInfo get(String methodName)
Return theMethodInfo
object in the list with the given name, or null if not found.
-
filter
public MethodInfoList filter(MethodInfoList.MethodInfoFilter filter)
Find the subset of theMethodInfo
objects in this list for which the given filter predicate is true.- Parameters:
filter
- TheMethodInfoList.MethodInfoFilter
to apply.- Returns:
- The subset of the
MethodInfo
objects in this list for which the given filter predicate is true.
-
-