public final class SoyFileSetNode extends AbstractParentSoyNode<SoyFileNode> implements SoyNode.SplitLevelTopNode<SoyFileNode>
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.MsgBlockNode, SoyNode.MsgPlaceholderInitialNode, SoyNode.MsgSubstUnitNode, SoyNode.ParentSoyNode<N extends SoyNode>, SoyNode.RenderUnitNode, SoyNode.SplitLevelTopNode<N extends SoyNode>, SoyNode.StandaloneNode, SoyNode.StatementNode| Constructor and Description |
|---|
SoyFileSetNode(int id,
IdGenerator nodeIdGen) |
| Modifier and Type | Method and Description |
|---|---|
SoyFileSetNode |
copy(CopyState copyState)
Copies this node.
|
SoyNode.Kind |
getKind()
Returns this node's kind (corresponding to this node's specific type).
|
IdGenerator |
getNodeIdGenerator()
Returns the node id generator for this parse tree.
|
SourceLocation |
getSourceLocation()
Deprecated.
SoyFileSetNodes don't have source locations.
|
String |
toSourceString()
Deprecated.
|
addChild, addChild, addChildren, addChildren, appendSourceStringForChildren, clearChildren, getChild, getChildIndex, getChildren, numChildren, removeChild, removeChild, replaceChild, replaceChildgetId, getParent, setId, toStringcouldHaveSyntaxVersionAtLeast, equals, getNearestAncestor, getSyntaxVersionUpperBound, hasAncestor, hashCode, maybeSetSyntaxVersionUpperBound, setParentclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddChild, addChild, addChildren, addChildren, appendSourceStringForChildren, clearChildren, getChild, getChildIndex, getChildren, numChildren, removeChild, removeChild, replaceChild, replaceChildcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSyntaxVersionUpperBound, hasAncestor, maybeSetSyntaxVersionUpperBound, setParentpublic SoyFileSetNode(int id,
IdGenerator nodeIdGen)
id - The id for this node.nodeIdGen - The node id generator for this parse tree.public SoyNode.Kind getKind()
SoyNodepublic IdGenerator getNodeIdGenerator()
@Deprecated public String toSourceString()
NodeNote: Some nodes do not have a direct mapping to Soy source (such as nodes created during some optimization passes). Thus this method may not always be supported.
toSourceString in interface Node@Deprecated public SourceLocation getSourceLocation()
AbstractSoyNodeThis is an optional operation. Some nodes don't have source locations.
getSourceLocation in interface NodegetSourceLocation in class AbstractSoyNodepublic SoyFileSetNode copy(CopyState copyState)
SoyNodeAll copy() overrides should follow this contract:
{@literal @}Override public T copy(CopyState copyState) {
return new T(this, copyState);
}
TODO(lukes): The usecases for a copy method are few and far between. Making the AST nodes immutable (or at least unmodifiable) would be preferable to maintaining our copy() methods.
Don't clone nodes unless you know what you're doing. The Soy AST is not actually a tree (it contains back edges from variables to their definitions), and naively copying nodes can result in pointers into stale ASTs
The copied nodes will have the same ids as the original nodes. If you need to copy a subtree
with new ids assigned to the copied nodes, use SoyTreeUtils.cloneWithNewIds(T, com.google.template.soy.base.internal.IdGenerator).