public abstract class AbstractSoyNode extends AbstractNode implements SoyNode
Important: Do not use outside of Soy code (treat as superpackage-private).
SoyNode.BlockCommandNode, SoyNode.BlockNode, SoyNode.CommandNode, SoyNode.ConditionalBlockNode, SoyNode.ExprHolderNode, SoyNode.Kind, SoyNode.LocalVarBlockNode, SoyNode.LocalVarInlineNode, SoyNode.LocalVarNode, SoyNode.LoopNode, SoyNode.MsgBlockNode, SoyNode.MsgPlaceholderInitialNode, SoyNode.MsgSubstUnitNode, SoyNode.ParentSoyNode<N extends SoyNode>, SoyNode.RenderUnitNode, SoyNode.SplitLevelTopNode<N extends SoyNode>, SoyNode.StandaloneNode, SoyNode.StatementNodeSPACES| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSoyNode(AbstractSoyNode orig,
CopyState copyState)
Copy constructor.
|
protected |
AbstractSoyNode(int id,
SourceLocation sourceLocation) |
| Modifier and Type | Method and Description |
|---|---|
int |
getId()
Returns this node's id.
|
SoyNode.ParentSoyNode<?> |
getParent()
Gets this node's parent.
|
SourceLocation |
getSourceLocation()
The location in the file from which this node was parsed or derived.
|
void |
setId(int id)
Sets this node's id.
|
String |
toString() |
couldHaveSyntaxVersionAtLeast, equals, getNearestAncestor, getSyntaxVersionUpperBound, hasAncestor, hashCode, maybeSetSyntaxVersionUpperBound, setParentclone, finalize, getClass, notify, notifyAll, wait, wait, waitcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSyntaxVersionUpperBound, hasAncestor, maybeSetSyntaxVersionUpperBound, setParent, toSourceStringprotected AbstractSoyNode(int id,
SourceLocation sourceLocation)
id - The id for this node.sourceLocation - The node's source location.protected AbstractSoyNode(AbstractSoyNode orig, CopyState copyState)
orig - The node to copy.public void setId(int id)
SoyNodeImportant: The id should already be set during construction, so this method should only be used during cloning.
public int getId()
SoyNodepublic SourceLocation getSourceLocation()
getSourceLocation in interface Nodepublic SoyNode.ParentSoyNode<?> getParent()
Nodepublic String toString()
toString in class AbstractNode