Class BeanScanner<T>
- java.lang.Object
-
- dev.aherscu.qa.testing.extra.supermachine.Scanner<T>
-
- dev.aherscu.qa.testing.extra.supermachine.BeanScanner<T>
-
- Type Parameters:
T
- the type of the traversed items.
public final class BeanScanner<T> extends Scanner<T>
A scanner traversing an object graph.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <X> Scanner<X>
create(Stream<X> source)
Constructs a scanner out of a source stream.<X> Scanner<X>
find(Class<X> clazz)
Traverses the object graph for each items of this scanner and returns a scanner emitting the first item of the given type found in each branch.static <X> Scanner<X>
from(X root)
Creates a bean scanner.<X> Scanner<X>
walk(Class<X> clazz)
Traverses the object graph for each items of this scanner and returns a scanner emitting all found items of the given type.
-
-
-
Method Detail
-
from
public static <X> Scanner<X> from(X root)
Creates a bean scanner.- Type Parameters:
X
- the type of the root object.- Parameters:
root
- the root object from which the graph will be traversed.- Returns:
- a scanner for the root object.
-
find
public <X> Scanner<X> find(Class<X> clazz)
Traverses the object graph for each items of this scanner and returns a scanner emitting the first item of the given type found in each branch.
-
walk
public <X> Scanner<X> walk(Class<X> clazz)
Traverses the object graph for each items of this scanner and returns a scanner emitting all found items of the given type.
-
-