@PublicApi public abstract class AbstractNode<T extends Node> extends java.lang.Object implements Node<T>
Constructor and Description |
---|
AbstractNode(SourceLocation sourceLocation,
java.util.List<Comment> comments,
IgnoredChars ignoredChars) |
AbstractNode(SourceLocation sourceLocation,
java.util.List<Comment> comments,
IgnoredChars ignoredChars,
java.util.Map<java.lang.String,java.lang.String> additionalData) |
Modifier and Type | Method and Description |
---|---|
protected <V extends Node> |
deepCopy(java.util.List<? extends Node> list) |
protected <V extends Node> |
deepCopy(V nullableObj) |
java.util.Map<java.lang.String,java.lang.String> |
getAdditionalData()
A node can have a map of additional data associated with it.
|
java.util.List<Comment> |
getComments()
Nodes can have comments made on them, the following is one comment per line before a node.
|
IgnoredChars |
getIgnoredChars()
The chars which are ignored by the parser.
|
SourceLocation |
getSourceLocation() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accept, deepCopy, getChildren, getNamedChildren, isEqualTo, withNewChildren
public AbstractNode(SourceLocation sourceLocation, java.util.List<Comment> comments, IgnoredChars ignoredChars)
public AbstractNode(SourceLocation sourceLocation, java.util.List<Comment> comments, IgnoredChars ignoredChars, java.util.Map<java.lang.String,java.lang.String> additionalData)
public SourceLocation getSourceLocation()
getSourceLocation
in interface Node<T extends Node>
public java.util.List<Comment> getComments()
Node
getComments
in interface Node<T extends Node>
public IgnoredChars getIgnoredChars()
Node
getIgnoredChars
in interface Node<T extends Node>
public java.util.Map<java.lang.String,java.lang.String> getAdditionalData()
Node
NOTE: The reason this is a map of strings is so the Node can stay an immutable object, which Map<String,Object> would not allow say.
getAdditionalData
in interface Node<T extends Node>
protected <V extends Node> V deepCopy(V nullableObj)