Package io.apicurio.datamodels
Class VisitorUtil
- java.lang.Object
-
- io.apicurio.datamodels.VisitorUtil
-
public class VisitorUtil extends Object
- Author:
- eric.wittmann@gmail.com
-
-
Constructor Summary
Constructors Constructor Description VisitorUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidvisitPath(Node node, NodePath nodePath, Visitor visitor)Visits nodes along a specific path in the data model tree.static voidvisitTree(Node node, Visitor visitor, TraverserDirection direction)
-
-
-
Method Detail
-
visitTree
public static void visitTree(Node node, Visitor visitor, TraverserDirection direction)
-
visitPath
public static void visitPath(Node node, NodePath nodePath, Visitor visitor)
Visits nodes along a specific path in the data model tree. Starting from the given node, this method traverses the tree following the path segments defined in the NodePath, visiting each node along the way with the provided visitor. If a node along the path does not exist, traversal stops at the last reachable node.- Parameters:
node- The starting node (typically the root document)nodePath- The path to traverse through the data modelvisitor- The visitor to apply to each node along the path
-
-