Class TraversalExplanation
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.util.AbstractExplanation
org.apache.tinkerpop.gremlin.process.traversal.util.TraversalExplanation
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ImmutableExplanation
A TraversalExplanation takes a
Traversal and, for each registered TraversalStrategy, it creates a
mapping reflecting how each strategy alters the traversal. This is useful for understanding how each traversal
strategy mutates the traversal. This is useful in debugging and analysis of traversal compilation. The
AbstractExplanation.toString() has a pretty-print representation that is useful in the Gremlin Console.- Author:
- Marko A. Rodriguez (http://markorodriguez.com)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<org.javatuples.Pair<TraversalStrategy,Traversal.Admin<?, ?>>> protected Traversal.Admin<?,?> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFirst string is the traversal strategy, the second is the category and the third is the traversal representation at that point.Traversal.Admin<?,?> Get the originalTraversalused to create this explanation.protected StringList<org.javatuples.Pair<TraversalStrategy,Traversal.Admin<?, ?>>> Get the list ofTraversalStrategyapplications.Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.util.AbstractExplanation
getTraversalStepsAsString, prettyPrint, prettyPrint, spacing, toString
-
Field Details
-
traversal
-
strategyTraversals
-
-
Constructor Details
-
TraversalExplanation
protected TraversalExplanation() -
TraversalExplanation
-
-
Method Details
-
getStrategyTraversals
Get the list ofTraversalStrategyapplications. For strategy, the resultant mutatedTraversalis provided.- Returns:
- the list of strategy/traversal pairs
-
getOriginalTraversal
Get the originalTraversalused to create this explanation.- Returns:
- the original traversal
-
asImmutable
-
getStrategyTraversalsAsString
- Specified by:
getStrategyTraversalsAsStringin classAbstractExplanation
-
getOriginalTraversalAsString
- Specified by:
getOriginalTraversalAsStringin classAbstractExplanation
-
getIntermediates
Description copied from class:AbstractExplanationFirst string is the traversal strategy, the second is the category and the third is the traversal representation at that point.- Specified by:
getIntermediatesin classAbstractExplanation
-