@PublicApi public class AstZipper extends java.lang.Object
It is used by AstMultiZipper
and AstTransformer
to allow for an easy way to "manipulate" the
immutable Ast.
Constructor and Description |
---|
AstZipper(Node curNode,
java.util.List<AstBreadcrumb> breadcrumbs) |
Modifier and Type | Method and Description |
---|---|
java.util.List<AstBreadcrumb> |
getBreadcrumbs() |
Node |
getCurNode() |
Node |
getParent() |
AstZipper |
modifyNode(java.util.function.Function<Node,Node> transform) |
static AstZipper |
rootZipper(Node rootNode) |
Node |
toRoot() |
AstZipper |
withNewNode(Node newNode) |
public AstZipper(Node curNode, java.util.List<AstBreadcrumb> breadcrumbs)
public Node getCurNode()
public java.util.List<AstBreadcrumb> getBreadcrumbs()
public Node getParent()
public Node toRoot()