com.google.template.soy.soytree
Class ForeachIfemptyNode

java.lang.Object
  extended by com.google.template.soy.basetree.AbstractNode
      extended by com.google.template.soy.soytree.AbstractSoyNode
          extended by com.google.template.soy.soytree.AbstractCommandNode
              extended by com.google.template.soy.soytree.AbstractParentCommandNode<SoyNode.StandaloneNode>
                  extended by com.google.template.soy.soytree.AbstractBlockCommandNode
                      extended by 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 Class Summary
 
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
 
Field Summary
 
Fields inherited from class com.google.template.soy.basetree.AbstractNode
SPACES
 
Constructor Summary
protected ForeachIfemptyNode(ForeachIfemptyNode orig)
          Copy constructor.
  ForeachIfemptyNode(int id)
           
 
Method Summary
 ForeachIfemptyNode clone()
          Clones this node.
 SoyNode.Kind getKind()
          Returns this node's kind (corresponding to this node's specific type).
 ForeachNode getParent()
          Gets this node's parent.
 String toSourceString()
          Builds a Soy source string that could be the source for this node.
 
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 class com.google.template.soy.soytree.AbstractCommandNode
buildTagStringHelper, buildTagStringHelper, getCommandName, getCommandText, getTagString
 
Methods inherited from class com.google.template.soy.soytree.AbstractSoyNode
getId, getSourceLocation, getSyntaxVersion, maybeSetSyntaxVersion, setId, setSourceLocation, toString
 
Methods inherited from class com.google.template.soy.basetree.AbstractNode
getNearestAncestor, hasAncestor, setParent
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.template.soy.soytree.SoyNode.ParentSoyNode
needsEnvFrameDuringInterp, setNeedsEnvFrameDuringInterp
 
Methods inherited from interface com.google.template.soy.soytree.SoyNode
getId, getSourceLocation, getSyntaxVersion, setId, setSourceLocation
 
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
 
Methods inherited from interface com.google.template.soy.basetree.Node
getNearestAncestor, hasAncestor, setParent, toTreeString
 
Methods inherited from interface com.google.template.soy.soytree.SoyNode.CommandNode
getCommandName, getCommandText, getTagString
 

Constructor Detail

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.
Method Detail

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.