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(java.util.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(java.util.Collection<? extends T> c) |
boolean |
addAll(int index,
java.util.Collection<? extends T> c) |
java.util.Map<java.lang.String,MethodInfoList> |
asMap()
Get this
MethodInfoList as a map from method name to a MethodInfoList of methods with that
name. |
void |
clear() |
boolean |
containsName(java.lang.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. |
protected void |
findReferencedClassInfo(java.util.Map<java.lang.String,ClassInfo> classNameToClassInfo,
java.util.Set<ClassInfo> refdClassInfo,
LogNode log)
Get
ClassInfo objects for any classes referenced in the type descriptor or type signature. |
MethodInfoList |
get(java.lang.String methodName)
Returns a list of all methods matching a given name.
|
MethodInfo |
getSingleMethod(java.lang.String methodName)
Returns a single method with the given name, or null if not found.
|
java.util.Iterator<T> |
iterator() |
java.util.ListIterator<T> |
listIterator() |
T |
remove(int index) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
T |
set(int index,
T element) |
equals, getAsStrings, getAsStringsWithSimpleNames, getNames, hashCodeclone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, lastIndexOf, listIterator, removeIf, removeRange, replaceAll, size, sort, spliterator, subList, toArray, toArray, trimToSizepublic MethodInfoList()
MethodInfo objects.public MethodInfoList(int sizeHint)
MethodInfo objects, given a size hint.sizeHint - the size hintpublic MethodInfoList(java.util.Collection<MethodInfo> methodInfoCollection)
MethodInfoList, given an initial collection of MethodInfo
objects.methodInfoCollection - the collection of MethodInfo objects.public static MethodInfoList emptyList()
MethodInfoList.MethodInfoList.protected void findReferencedClassInfo(java.util.Map<java.lang.String,ClassInfo> classNameToClassInfo, java.util.Set<ClassInfo> refdClassInfo, LogNode log)
ClassInfo objects for any classes referenced in the type descriptor or type signature.classNameToClassInfo - the map from class name to ClassInfo.refdClassInfo - the referenced class infolog - the logpublic java.util.Map<java.lang.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(java.lang.String methodName)
methodName - The name of a class.public MethodInfoList get(java.lang.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(java.lang.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.java.lang.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)
add in interface java.util.Collection<T>add in interface java.util.List<T>add in class java.util.ArrayList<T>public void add(int index,
T element)
add in interface java.util.List<T>add in class java.util.ArrayList<T>public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<T>remove in interface java.util.List<T>remove in class java.util.ArrayList<T>public T remove(int index)
remove in interface java.util.List<T>remove in class java.util.ArrayList<T>public boolean addAll(java.util.Collection<? extends T> c)
addAll in interface java.util.Collection<T>addAll in interface java.util.List<T>addAll in class java.util.ArrayList<T>public boolean addAll(int index,
java.util.Collection<? extends T> c)
addAll in interface java.util.List<T>addAll in class java.util.ArrayList<T>public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<T>removeAll in interface java.util.List<T>removeAll in class java.util.ArrayList<T>public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<T>retainAll in interface java.util.List<T>retainAll in class java.util.ArrayList<T>public void clear()
clear in interface java.util.Collection<T>clear in interface java.util.List<T>clear in class java.util.ArrayList<T>public T set(int index,
T element)
set in interface java.util.List<T>set in class java.util.ArrayList<T>public java.util.Iterator<T> iterator()
iterator in interface java.lang.Iterable<T>iterator in interface java.util.Collection<T>iterator in interface java.util.List<T>iterator in class java.util.ArrayList<T>public java.util.ListIterator<T> listIterator()
listIterator in interface java.util.List<T>listIterator in class java.util.ArrayList<T>