com.google.template.soy.soytree
Class ForeachIfemptyNode
java.lang.Object
com.google.template.soy.basetree.AbstractNode
com.google.template.soy.soytree.AbstractSoyNode
com.google.template.soy.soytree.AbstractCommandNode
com.google.template.soy.soytree.AbstractParentCommandNode<SoyNode.StandaloneNode>
com.google.template.soy.soytree.AbstractBlockCommandNode
com.google.template.soy.soytree.ForeachIfemptyNode
- All Implemented Interfaces:
- Node, ParentNode<SoyNode.StandaloneNode>, SoyNode, SoyNode.BlockCommandNode, SoyNode.BlockNode, SoyNode.CommandNode, SoyNode.ConditionalBlockNode, SoyNode.ParentSoyNode<SoyNode.StandaloneNode>
public class ForeachIfemptyNode
- extends AbstractBlockCommandNode
- implements SoyNode.ConditionalBlockNode
Node representing the 'ifempty' portion of a 'foreach' statement.
Important: Do not use outside of Soy code (treat as superpackage-private).
| Nested classes/interfaces inherited from interface com.google.template.soy.soytree.SoyNode |
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.ParentSoyNode<N extends SoyNode>, SoyNode.RenderUnitNode, SoyNode.SplitLevelTopNode<N extends SoyNode>, SoyNode.StandaloneNode, SoyNode.StatementNode, SoyNode.SyntaxVersion |
| Methods inherited from class com.google.template.soy.soytree.AbstractParentCommandNode |
addChild, addChild, addChildren, addChildren, appendSourceStringForChildren, appendTreeStringForChildren, clearChildren, getChild, getChildIndex, getChildren, needsEnvFrameDuringInterp, numChildren, removeChild, removeChild, replaceChild, replaceChild, setNeedsEnvFrameDuringInterp, toTreeString |
| Methods inherited from interface com.google.template.soy.basetree.ParentNode |
addChild, addChild, addChildren, addChildren, appendSourceStringForChildren, appendTreeStringForChildren, clearChildren, getChild, getChildIndex, getChildren, numChildren, removeChild, removeChild, replaceChild, replaceChild |
ForeachIfemptyNode
public ForeachIfemptyNode(int id)
- Parameters:
id - The id for this node.
ForeachIfemptyNode
protected ForeachIfemptyNode(ForeachIfemptyNode orig)
- Copy constructor.
- Parameters:
orig - The node to copy.
getKind
public SoyNode.Kind getKind()
- Description copied from interface:
SoyNode
- Returns this node's kind (corresponding to this node's specific type).
- Specified by:
getKind in interface SoyNode
toSourceString
public String toSourceString()
- Description copied from interface:
Node
- Builds a Soy source string that could be the source for this node. Note that this is not the
actual original source string, but a (sort of) canonical equivalent.
Note: 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.
- Specified by:
toSourceString in interface Node- Overrides:
toSourceString in class AbstractParentCommandNode<SoyNode.StandaloneNode>
- Returns:
- A Soy string that could be the source for this node.
getParent
public ForeachNode getParent()
- Description copied from interface:
Node
- Gets this node's parent.
- Specified by:
getParent in interface Node- Specified by:
getParent in interface SoyNode- Overrides:
getParent in class AbstractSoyNode
- Returns:
- This node's parent.
clone
public ForeachIfemptyNode clone()
- Description copied from interface:
Node
- Clones this node. The clone's parent pointer is set to null.
- Specified by:
clone in interface Node- Specified by:
clone in interface SoyNode- Specified by:
clone in class AbstractSoyNode
- Returns:
- A clone of this code.