public class MethodStream
extends java.lang.Object
| Constructor and Description |
|---|
MethodStream(RStream parent) |
| Modifier and Type | Method and Description |
|---|---|
MethodWrapper |
by(java.lang.Class<?>... parameterTypes)
Get the
MethodWrapper instance of the method with the given parameter types |
MethodWrapper |
by(int index)
Get the
MethodWrapper instance of the method with the given index |
MethodWrapper |
by(java.lang.String name)
Get the
MethodWrapper instance of the method with the given name |
MethodWrapper |
by(java.lang.String name,
java.lang.Class<?>... parameterTypes)
Get the
MethodWrapper instance of the method with the given name and parameter types |
MethodStream |
filter(boolean isStatic)
Filter out all static/non-static methods
|
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 by the given predicate
|
MethodStream |
filter(java.lang.String name)
Filter the methods by the given name
|
MethodStream |
forEach(java.util.function.Consumer<MethodWrapper> consumer)
Loop through all
MethodWrapper instances |
java.util.Iterator<MethodWrapper> |
iterator()
Get an iterator of the
MethodWrapper instances |
java.util.stream.Stream<MethodWrapper> |
jstream()
Get the java stream of the
MethodWrapper instances |
RStream |
parent()
Get the parent
RStream instance |
int |
size()
Get the amount of methods in this stream
|
public MethodStream(RStream parent)
public int size()
public MethodWrapper by(java.lang.String name)
MethodWrapper instance of the method with the given namename - The name of the methodMethodWrapper instancejava.lang.NoSuchMethodException - If the method doesn't existpublic MethodWrapper by(java.lang.Class<?>... parameterTypes)
MethodWrapper instance of the method with the given parameter typesparameterTypes - The parameter types of the methodMethodWrapper instancejava.lang.NoSuchMethodException - If the method doesn't existpublic MethodWrapper by(java.lang.String name, java.lang.Class<?>... parameterTypes)
MethodWrapper instance of the method with the given name and parameter typesname - The name of the methodparameterTypes - The parameter types of the methodMethodWrapper instancejava.lang.NoSuchMethodException - If the method doesn't existpublic MethodWrapper by(int index)
MethodWrapper instance of the method with the given indexindex - The index of the methodMethodWrapper instancejava.lang.NoSuchMethodException - If the method doesn't existpublic MethodStream filter(java.util.function.Predicate<MethodWrapper> filter)
filter - The predicateMethodStreampublic MethodStream filter(java.lang.String name)
name - The nameMethodStreampublic MethodStream filter(java.lang.Class<?>... parameterTypes)
parameterTypes - The parameter typesMethodStreampublic MethodStream filter(boolean isStatic)
isStatic - Whether the method should be static or notMethodStreampublic java.util.Iterator<MethodWrapper> iterator()
MethodWrapper instancespublic java.util.stream.Stream<MethodWrapper> jstream()
MethodWrapper instancespublic MethodStream forEach(java.util.function.Consumer<MethodWrapper> consumer)
MethodWrapper instancesconsumer - The consumerMethodStream