public abstract class Node extends Object
Block and inlines).
A node can have multiple children, and a parent (except for the root node).
| Constructor and Description |
|---|
Node() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
accept(Visitor visitor) |
void |
addSourceSpan(SourceSpan sourceSpan)
Add a source span to the end of the list.
|
void |
appendChild(Node child) |
Node |
getFirstChild() |
Node |
getLastChild() |
Node |
getNext() |
Node |
getParent() |
Node |
getPrevious() |
List<SourceSpan> |
getSourceSpans() |
void |
insertAfter(Node sibling) |
void |
insertBefore(Node sibling) |
void |
prependChild(Node child) |
protected void |
setParent(Node parent) |
void |
setSourceSpans(List<SourceSpan> sourceSpans)
Replace the current source spans with the provided list.
|
String |
toString() |
protected String |
toStringAttributes() |
void |
unlink() |
public abstract void accept(Visitor visitor)
public Node getNext()
public Node getPrevious()
public Node getFirstChild()
public Node getLastChild()
public Node getParent()
protected void setParent(Node parent)
public void appendChild(Node child)
public void prependChild(Node child)
public void unlink()
public void insertAfter(Node sibling)
public void insertBefore(Node sibling)
public List<SourceSpan> getSourceSpans()
public void setSourceSpans(List<SourceSpan> sourceSpans)
sourceSpans - the new source spans to setpublic void addSourceSpan(SourceSpan sourceSpan)
sourceSpan - the source span to addprotected String toStringAttributes()
Copyright © 2021. All rights reserved.