public class MethodInfoList extends InfoList<MethodInfo>
MethodInfo
objects.Modifier and Type | Class and Description |
---|---|
static interface |
MethodInfoList.MethodInfoFilter
Filter an
MethodInfoList using a predicate mapping an MethodInfo object to a boolean,
producing another MethodInfoList for all items in the list for which the predicate is true. |
Constructor and Description |
---|
MethodInfoList()
Construct a new modifiable empty list of
MethodInfo objects. |
MethodInfoList(Collection<MethodInfo> methodInfoCollection)
Construct a new modifiable empty
MethodInfoList , given an initial collection of MethodInfo
objects. |
MethodInfoList(int sizeHint)
Construct a new modifiable empty list of
MethodInfo objects, given a size hint. |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
T element) |
boolean |
add(T element) |
boolean |
addAll(Collection<? extends T> c) |
boolean |
addAll(int index,
Collection<? extends T> c) |
Map<String,MethodInfoList> |
asMap()
Get this
MethodInfoList as a map from method name to a MethodInfoList of methods with that
name. |
void |
clear() |
boolean |
containsName(String methodName)
Check whether the list contains a method with the given name.
|
static MethodInfoList |
emptyList()
Return an unmodifiable empty
MethodInfoList . |
MethodInfoList |
filter(MethodInfoList.MethodInfoFilter filter)
Find the subset of the
MethodInfo objects in this list for which the given filter predicate is true. |
MethodInfoList |
get(String methodName)
Returns a list of all methods matching a given name.
|
MethodInfo |
getSingleMethod(String methodName)
Returns a single method with the given name, or null if not found.
|
Iterator<T> |
iterator() |
ListIterator<T> |
listIterator() |
T |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
T |
set(int index,
T element) |
equals, getAsStrings, getAsStringsWithSimpleNames, getNames, hashCode
clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, lastIndexOf, listIterator, removeIf, replaceAll, size, sort, spliterator, subList, toArray, toArray, trimToSize
containsAll, toString
containsAll
parallelStream, stream
public MethodInfoList()
MethodInfo
objects.public MethodInfoList(int sizeHint)
MethodInfo
objects, given a size hint.sizeHint
- the size hintpublic MethodInfoList(Collection<MethodInfo> methodInfoCollection)
MethodInfoList
, given an initial collection of MethodInfo
objects.methodInfoCollection
- the collection of MethodInfo
objects.public static MethodInfoList emptyList()
MethodInfoList
.MethodInfoList
.public Map<String,MethodInfoList> asMap()
MethodInfoList
as a map from method name to a MethodInfoList
of methods with that
name.MethodInfoList
as a map from method name to a MethodInfoList
of methods with
that name.public boolean containsName(String methodName)
methodName
- The name of a class.public MethodInfoList get(String methodName)
MethodInfoList
rather than a single MethodInfo
.)methodName
- The name of a method.MethodInfoList
of MethodInfo
objects from this list that have the given name (there
may be more than one method with a given name, due to overloading, so this returns a
MethodInfoList
rather than a single MethodInfo
). Returns the empty list if no method
had a matching name.public MethodInfo getSingleMethod(String methodName)
IllegalArgumentException
if
there are two methods with the given name.methodName
- The name of a method.MethodInfo
object from the list with the given name, if there is exactly one method with
the given name. Returns null if there were no methods with the given name.IllegalArgumentException
- if there are two or more methods with the given name.public MethodInfoList filter(MethodInfoList.MethodInfoFilter filter)
MethodInfo
objects in this list for which the given filter predicate is true.filter
- The MethodInfoList.MethodInfoFilter
to apply.MethodInfo
objects in this list for which the given filter predicate is
true.public boolean add(T element)
public void add(int index, T element)
public boolean remove(Object o)
public T remove(int index)
public boolean addAll(Collection<? extends T> c)
public boolean addAll(int index, Collection<? extends T> c)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public void clear()
public T set(int index, T element)
public Iterator<T> iterator()
public ListIterator<T> listIterator()
listIterator
in interface List<T>
listIterator
in class ArrayList<T>
Copyright © 2021. All rights reserved.