public class ConstructorStream
extends java.lang.Object
| Constructor and Description |
|---|
ConstructorStream(RStream parent) |
| Modifier and Type | Method and Description |
|---|---|
ConstructorWrapper |
by(java.lang.Class<?>... parameterTypes)
Get a constructor by the given parameter types.
|
ConstructorWrapper |
by(int index)
Get a constructor by the given index.
|
ConstructorStream |
copy() |
ConstructorStream |
filter(boolean isStatic)
Filter the constructors by whether they are static.
|
ConstructorStream |
filter(java.lang.Class<?>... parameterTypes)
Filter the methods by the given parameter types.
|
ConstructorStream |
filter(java.util.function.Predicate<ConstructorWrapper> filter)
Filter the methods with the given filter.
|
ConstructorStream |
filterAnnotation(java.lang.Class<?> annotation)
Filter the constructors by whether they have the given annotation.
|
ConstructorStream |
forEach(java.util.function.Consumer<ConstructorWrapper> consumer)
Loop through all constructors in this stream.
|
java.util.Iterator<ConstructorWrapper> |
iterator() |
java.util.stream.Stream<ConstructorWrapper> |
jstream() |
<T> java.util.stream.Stream<T> |
map(java.util.function.Function<ConstructorWrapper,T> mapFunction)
Map the constructors to a new stream.
|
java.util.Optional<ConstructorWrapper> |
opt(java.lang.Class<?>... parameterTypes)
Get a constructor by the given parameter types.
|
java.util.Optional<ConstructorWrapper> |
opt(int index)
Get a constructor by the given index.
|
RStream |
parent() |
int |
size() |
public ConstructorStream(RStream parent)
public RStream parent()
public int size()
public java.util.Optional<ConstructorWrapper> opt(@Nullable java.lang.Class<?>... parameterTypes)
parameterTypes - The parameter types of the constructorpublic java.util.Optional<ConstructorWrapper> opt(int index)
index - The index of the constructorpublic ConstructorWrapper by(@Nullable java.lang.Class<?>... parameterTypes)
parameterTypes - The parameter types of the constructorConstructorNotFoundException - If the constructor doesn't existpublic ConstructorWrapper by(int index)
index - The index of the constructorConstructorNotFoundException - If the constructor doesn't existpublic ConstructorStream filter(java.util.function.Predicate<ConstructorWrapper> filter)
filter - The filterpublic ConstructorStream filter(@Nullable java.lang.Class<?>... parameterTypes)
parameterTypes - The parameter types of the constructorpublic ConstructorStream filter(boolean isStatic)
isStatic - Whether the constructor should be staticpublic ConstructorStream filterAnnotation(java.lang.Class<?> annotation)
annotation - The annotationpublic java.util.Iterator<ConstructorWrapper> iterator()
public <T> java.util.stream.Stream<T> map(java.util.function.Function<ConstructorWrapper,T> mapFunction)
jstream() and then Stream.map(Function).T - The type of the new streammapFunction - The map functionpublic java.util.stream.Stream<ConstructorWrapper> jstream()
public ConstructorStream forEach(java.util.function.Consumer<ConstructorWrapper> consumer)
consumer - The consumerpublic ConstructorStream copy()