Enum Class TreeTraversal
- All Implemented Interfaces:
Serializable,Comparable<TreeTraversal>,Constable
Support for traversing a trace's object tree
Many of these are already built into the object and value interfaces. Direct use of this traversal support is only needed when performing customized traversals. In most cases, it's sufficient to use a built-in traversal and filter the resulting stream. Customized traversal is only needed when it's beneficial to prune subtrees in a way that no built-in traversal provides.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA visitor providing defaultTreeTraversal.SpanIntersectingVisitor.composeSpan(Lifespan, TraceObjectValue)that intersects the spansstatic interfaceAn object-tree visitorstatic enumA result directing the traversal how to proceedNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic TreeTraversalReturns the enum constant of this class with the specified name.static TreeTraversal[]values()Returns an array containing the constants of this enum class, in the order they are declared.Stream<? extends TraceObjectValPath> walkObject(TreeTraversal.Visitor visitor, TraceObject object, Lifespan span, TraceObjectValPath path) Walk an object and its subtreeStream<? extends TraceObjectValPath> walkValue(TreeTraversal.Visitor visitor, TraceObjectValue value, Lifespan span, TraceObjectValPath path) Walk a value and possibly its subtree
-
Enum Constant Details
-
INSTANCE
The singleton instance
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
walkValue
public Stream<? extends TraceObjectValPath> walkValue(TreeTraversal.Visitor visitor, TraceObjectValue value, Lifespan span, TraceObjectValPath path) Walk a value and possibly its subtree- Parameters:
visitor- the visitorvalue- the current valuespan- the composed span from seed to but excluding the current valuepath- the path from seed to but excluding the current value- Returns:
- the result stream of the value and subtree walked
-
walkObject
public Stream<? extends TraceObjectValPath> walkObject(TreeTraversal.Visitor visitor, TraceObject object, Lifespan span, TraceObjectValPath path) Walk an object and its subtree- Parameters:
visitor- the visitorobject- the current objectspan- the composed span from seed to current objectpath- the path from seed to current object- Returns:
- the result stream of the object and subtree walked
-