public class MethodStream
extends java.lang.Object
| Constructor and Description |
|---|
MethodStream(RStream parent,
boolean withSuper) |
| Modifier and Type | Method and Description |
|---|---|
MethodWrapper |
by(java.lang.Class<?>... parameterTypes)
Get a method by the given parameter types.
|
MethodWrapper |
by(int index)
Get a method by the given index.
|
MethodWrapper |
by(java.lang.String name)
Get a method by the given name.
|
MethodWrapper |
by(java.lang.String name,
java.lang.Class<?>... parameterTypes)
Get a method by the given name and parameter types.
|
MethodStream |
filter(boolean isStatic)
Filter the methods by whether they are static.
|
MethodStream |
filter(java.lang.Class<?>... parameterTypes)
Filter the methods by the given parameter types.
|
MethodStream |
filter(java.util.function.Predicate<MethodWrapper> filter)
Filter the methods with the given filter.
|
MethodStream |
filter(java.lang.String name)
Filter the methods by the given name.
|
MethodStream |
forEach(java.util.function.Consumer<MethodWrapper> consumer)
Loop through all methods in this stream.
|
java.util.Iterator<MethodWrapper> |
iterator() |
java.util.stream.Stream<MethodWrapper> |
jstream() |
RStream |
parent() |
int |
size() |
public MethodStream(RStream parent, boolean withSuper)
public RStream parent()
public int size()
public MethodWrapper by(java.lang.String name)
name - The name of the methodjava.lang.NoSuchMethodException - If the method doesn't existpublic MethodWrapper by(java.lang.Class<?>... parameterTypes)
parameterTypes - The parameter types of the methodjava.lang.NoSuchMethodException - If the method doesn't existpublic MethodWrapper by(java.lang.String name, java.lang.Class<?>... parameterTypes)
name - The name of the methodparameterTypes - The parameter types of the methodjava.lang.NoSuchMethodException - If the method doesn't existpublic MethodWrapper by(int index)
index - The index of the methodjava.lang.NoSuchMethodException - If the method doesn't existpublic MethodStream filter(java.util.function.Predicate<MethodWrapper> filter)
filter - The filterpublic MethodStream filter(java.lang.String name)
name - The name of the methodpublic MethodStream filter(java.lang.Class<?>... parameterTypes)
parameterTypes - The parameter types of the methodpublic MethodStream filter(boolean isStatic)
isStatic - Whether the methods should be staticpublic java.util.Iterator<MethodWrapper> iterator()
public java.util.stream.Stream<MethodWrapper> jstream()
public MethodStream forEach(java.util.function.Consumer<MethodWrapper> consumer)
consumer - The consumer