Class TraversalContextImpl
- java.lang.Object
-
- io.apicurio.datamodels.models.visitors.TraversalContextImpl
-
- All Implemented Interfaces:
TraversalContext
public class TraversalContextImpl extends Object implements TraversalContext
Context used during traversal of a model. This gives insight into where in the traversal of a model a visitor/traverser might be. The traverser maintains this context and optionally makes it available to the visitor (only if the visitor implements the TraversingVisitor interface.- Author:
- eric.wittmann@gmail.com
-
-
Constructor Summary
Constructors Constructor Description TraversalContextImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsStep(TraversalStepType type, Object value)List<TraversalStep>getAllSteps()StringgetMostRecentPropertyStep()TraversalStepgetMostRecentStep()TraversalSteppeek()voidpop()voidpushListIndex(int index)voidpushMapIndex(String key)voidpushProperty(String propertyName)
-
-
-
Method Detail
-
pushProperty
public void pushProperty(String propertyName)
-
pushListIndex
public void pushListIndex(int index)
-
pushMapIndex
public void pushMapIndex(String key)
-
pop
public void pop()
-
peek
public TraversalStep peek()
-
getMostRecentStep
public TraversalStep getMostRecentStep()
- Specified by:
getMostRecentStepin interfaceTraversalContext
-
getAllSteps
public List<TraversalStep> getAllSteps()
- Specified by:
getAllStepsin interfaceTraversalContext
-
getMostRecentPropertyStep
public String getMostRecentPropertyStep()
- Specified by:
getMostRecentPropertyStepin interfaceTraversalContext
-
containsStep
public boolean containsStep(TraversalStepType type, Object value)
- Specified by:
containsStepin interfaceTraversalContext
-
-