Class ExecutionPlanNode
-
- All Implemented Interfaces:
-
au.com.dius.pact.core.model.Into
public final class ExecutionPlanNode implements Into<ExecutionPlanNode>
Node in an executable plan tree
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classExecutionPlanNode.Companion
-
Field Summary
Fields Modifier and Type Field Description private final PlanNodeTypenodeTypeprivate final NodeResultresultprivate final List<ExecutionPlanNode>childrenpublic final static ExecutionPlanNode.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description ExecutionPlanNode(PlanNodeType nodeType, NodeResult result, List<ExecutionPlanNode> children)
-
Method Summary
Modifier and Type Method Description final PlanNodeTypegetNodeType()Type of the node final NodeResultgetResult()Any result associated with the node final List<ExecutionPlanNode>getChildren()Child nodes final <N extends Into<ExecutionPlanNode>> ExecutionPlanNodeadd(N node)Adds the node as a child final BooleanisEmpty()If the node is a leaf node final BooleanisNotEmpty()If the node is not a leaf node ExecutionPlanNodeinto()final StringstrForm(StringBuilder buffer)Returns the serialised text form of the node final UnitprettyForm(StringBuilder buffer, Integer indent)Returns the human-readable text from of the node final UnitgenerateSummary(Boolean ansiColor, StringBuilder buffer, Integer indent)Return a summary of the execution to display in a console final UnitgenerateChildrenSummary(Boolean ansiColor, StringBuilder buffer, Integer indent)final ExecutionPlanNodefetchNode(List<String> path)Walks the tree to return any node that matches the given path final Booleanmatches(String identifier)final BooleanisSplat()If the node is a splat node final BooleanisContainer()If this node is a container final BooleanisLeafNode()If this node has no children final BooleanisTerminalContainer()If this node is a container and there are no more containers in the subtree final BooleanhasChildContainers()If this node has any containers in the subtree final NodeResultvalue()Returns the value for the node final StringannotationNode()final List<String>childErrors(Terminator terminator)Returns all the errors from the child nodes, either terminating at any child containers or just returning all errors. final Stringerror()Returns the first error found from this node stopping at child containers final List<String>errors()Returns all the errors found from this node final <ACC extends Any> ACCtraverseContainers(ACC initial, Function3<ACC, String, ExecutionPlanNode, ACC> callback)This a fold operation over the depth-first transversal of the containers in the tree from this node. final static Stringescape(String value)-
-
Constructor Detail
-
ExecutionPlanNode
ExecutionPlanNode(PlanNodeType nodeType, NodeResult result, List<ExecutionPlanNode> children)
-
-
Method Detail
-
getNodeType
final PlanNodeType getNodeType()
Type of the node
-
getResult
final NodeResult getResult()
Any result associated with the node
-
getChildren
final List<ExecutionPlanNode> getChildren()
Child nodes
-
add
final <N extends Into<ExecutionPlanNode>> ExecutionPlanNode add(N node)
Adds the node as a child
-
isNotEmpty
final Boolean isNotEmpty()
If the node is not a leaf node
-
into
ExecutionPlanNode into()
-
strForm
final String strForm(StringBuilder buffer)
Returns the serialised text form of the node
-
prettyForm
final Unit prettyForm(StringBuilder buffer, Integer indent)
Returns the human-readable text from of the node
-
generateSummary
final Unit generateSummary(Boolean ansiColor, StringBuilder buffer, Integer indent)
Return a summary of the execution to display in a console
-
generateChildrenSummary
final Unit generateChildrenSummary(Boolean ansiColor, StringBuilder buffer, Integer indent)
-
fetchNode
final ExecutionPlanNode fetchNode(List<String> path)
Walks the tree to return any node that matches the given path
-
isContainer
final Boolean isContainer()
If this node is a container
-
isLeafNode
final Boolean isLeafNode()
If this node has no children
-
isTerminalContainer
final Boolean isTerminalContainer()
If this node is a container and there are no more containers in the subtree
-
hasChildContainers
final Boolean hasChildContainers()
If this node has any containers in the subtree
-
value
final NodeResult value()
Returns the value for the node
-
annotationNode
final String annotationNode()
-
childErrors
final List<String> childErrors(Terminator terminator)
Returns all the errors from the child nodes, either terminating at any child containers or just returning all errors.
-
error
final String error()
Returns the first error found from this node stopping at child containers
-
traverseContainers
final <ACC extends Any> ACC traverseContainers(ACC initial, Function3<ACC, String, ExecutionPlanNode, ACC> callback)
This a fold operation over the depth-first transversal of the containers in the tree from this node.
-
-
-
-