public class FieldStream
extends java.lang.Object
| Constructor and Description |
|---|
FieldStream(RStream parent,
boolean withSuper) |
| Modifier and Type | Method and Description |
|---|---|
FieldWrapper |
by(int index)
Get a field by the given index.
|
FieldWrapper |
by(java.lang.String name)
Get a field by the given name.
|
FieldStream |
filter(boolean isStatic)
Filter the fields by whether tey are static.
|
FieldStream |
filter(java.lang.Class<?> clazz)
Filter the fields by the given type.
|
FieldStream |
filter(java.util.function.Predicate<FieldWrapper> filter)
Filter the fields with the given filter.
|
FieldStream |
forEach(java.util.function.Consumer<FieldWrapper> consumer)
Loop through all fields in this stream.
|
java.util.Iterator<FieldWrapper> |
iterator() |
java.util.stream.Stream<FieldWrapper> |
jstream() |
RStream |
parent() |
int |
size() |
public FieldStream(RStream parent, boolean withSuper)
public RStream parent()
public int size()
public FieldWrapper by(java.lang.String name)
name - The name of the fieldjava.lang.NoSuchFieldException - If the field doesn't existpublic FieldWrapper by(int index)
index - The index of the fieldjava.lang.NoSuchFieldException - If the field doesn't existpublic FieldStream filter(java.util.function.Predicate<FieldWrapper> filter)
filter - The filterpublic FieldStream filter(java.lang.Class<?> clazz)
clazz - The typepublic FieldStream filter(boolean isStatic)
isStatic - Whether the fields should be staticpublic java.util.Iterator<FieldWrapper> iterator()
public java.util.stream.Stream<FieldWrapper> jstream()
public FieldStream forEach(java.util.function.Consumer<FieldWrapper> consumer)
consumer - The consumer