| Package | Description |
|---|---|
| com.google.template.soy.basetree |
Classes shared by Soy parse trees and expression parse trees.
|
| com.google.template.soy.exprtree |
Expression parse tree.
|
| com.google.template.soy.soytree |
Soy parse tree.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractNodeVisitor<N extends Node,R>
Base class for
AbstractXxxNodeVisitor classes. |
class |
AbstractReturningNodeVisitor<N extends Node,R>
Base class for
AbstractXxxNodeVisitor classes. |
class |
MixinParentNode<N extends Node>
Mixin implementation of the parent-specific aspect of the ParentNode interface.
|
interface |
NodeVisitor<N extends Node,R>
External interface for a node visitor.
|
interface |
ParentNode<N extends Node>
A node that may have children in the parse tree.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
ParentNode<N extends Node>
A node that may have children in the parse tree.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractNode
Abstract implementation of a Node.
|
| Modifier and Type | Method and Description |
|---|---|
<N extends Node> |
Node.getNearestAncestor(Class<N> ancestorClass)
Finds and returns this node's nearest ancestor of the given type.
|
<N extends Node> |
AbstractNode.getNearestAncestor(Class<N> ancestorClass) |
| Modifier and Type | Method and Description |
|---|---|
Node |
Node.copy(CopyState copyState)
Copies this node.
|
| Modifier and Type | Method and Description |
|---|---|
int |
MixinParentNode.getChildIndex(Node child)
Finds the index of the given child.
|
int |
ParentNode.getChildIndex(Node child)
Finds the index of the given child.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
Node.hasAncestor(Class<? extends Node> ancestorClass)
Determines whether this node has an ancestor of the given type.
|
boolean |
AbstractNode.hasAncestor(Class<? extends Node> ancestorClass) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
ExprNode
This class defines the base interface for a node in the Soy expression parse tree, as well as a
number of subinterfaces that extend the base interface in various aspects.
|
static interface |
ExprNode.OperatorNode
A node representing an operator (with operands as children).
|
static interface |
ExprNode.ParentExprNode
A node in an expression parse tree that may be a parent.
|
static interface |
ExprNode.PrimitiveNode
A node representing a primitive literal.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractExprNode
Abstract implementation of an ExprNode.
|
class |
AbstractOperatorNode
Abstract implementation of an OperatorNode.
|
class |
AbstractParentExprNode
Abstract implementation of a ParentExprNode.
|
class |
BooleanNode
Node representing a boolean value.
|
class |
DataAccessNode
Base class which represents access to a field or element of an aggregate value, such as an object
or collection.
|
class |
ExprRootNode
Dummy node that serves as the root of an expression tree so that the tree can be arbitrarily
changed without needing to change the reference to the tree.
|
class |
FieldAccessNode
Reference to a named field.
|
class |
FloatNode
Node representing a float value.
|
class |
FunctionNode
A node representing a function (with args as children).
|
class |
GlobalNode
Node representing a global.
|
class |
IntegerNode
Node representing a Soy integer value.
|
class |
ItemAccessNode
Represents the bracket [] operation, which can either be used to access an array element by
index, or a map value by key.
|
class |
LegacyObjectMapLiteralNode
A node representing a legacy object map literal (with keys and values as alternating children).
|
class |
ListLiteralNode
A node representing a list literal (with items as children).
|
class |
MapLiteralNode
A node representing a map literal (with keys and values as alternating children).
|
class |
NullNode
Node representing a null value.
|
static class |
OperatorNodes.AndOpNode
Node representing the 'and' operator.
|
static class |
OperatorNodes.ConditionalOpNode
Node representing the ternary '? :' (conditional) operator.
|
static class |
OperatorNodes.DivideByOpNode
Node representing the '/' (divde by) operator.
|
static class |
OperatorNodes.EqualOpNode
Node representing the '==' (equal) operator.
|
static class |
OperatorNodes.GreaterThanOpNode
Node representing the '>' (greater than) operator.
|
static class |
OperatorNodes.GreaterThanOrEqualOpNode
Node representing the '>=' (greater than or equal) operator.
|
static class |
OperatorNodes.LessThanOpNode
Node representing the '<' (less than) operator.
|
static class |
OperatorNodes.LessThanOrEqualOpNode
Node representing the '<=' (less than or equal) operator.
|
static class |
OperatorNodes.MinusOpNode
Node representing the binary '-' (minus) operator.
|
static class |
OperatorNodes.ModOpNode
Node representing the '%' (mod) operator.
|
static class |
OperatorNodes.NegativeOpNode
Node representing the unary '-' (negative) operator.
|
static class |
OperatorNodes.NotEqualOpNode
Node representing the '!=' (not equal) operator.
|
static class |
OperatorNodes.NotOpNode
Node representing the 'not' operator.
|
static class |
OperatorNodes.NullCoalescingOpNode
Node representing the '?:' (null-coalescing) operator.
|
static class |
OperatorNodes.OrOpNode
Node representing the 'or' operator.
|
static class |
OperatorNodes.PlusOpNode
Node representing the '+' (plus) operator.
|
static class |
OperatorNodes.TimesOpNode
Node representing the '*' (times) operator.
|
class |
ProtoInitNode
A node representing a proto initialization function (with args as children).
|
class |
StringNode
Node representing a string value.
|
class |
VarRefNode
Expression representing an unqualified variable name, e.g.
|
| Modifier and Type | Method and Description |
|---|---|
int |
AbstractParentExprNode.getChildIndex(Node child) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
SoyNode
This class defines the base interface for a node in the parse tree, as well as a number of
subinterfaces that extend the base interface in various aspects.
|
static interface |
SoyNode.BlockCommandNode
A node that represents a Soy command that encloses a template block.
|
static interface |
SoyNode.BlockNode
A node that represents a template block.
|
static interface |
SoyNode.CommandNode
A node that represents a specific Soy command.
|
static interface |
SoyNode.ConditionalBlockNode
A node that represents a block of Soy code that is conditionally executed.
|
static interface |
SoyNode.ExprHolderNode
A node that holds some expressions in its fields/properties.
|
static interface |
SoyNode.LocalVarBlockNode
A node that adds a new local variable whose scope comprises the children of this code.
|
static interface |
SoyNode.LocalVarInlineNode
A node that adds a new local variable whose scope comprises the younger siblings of this node.
|
static interface |
SoyNode.LocalVarNode
A node that adds a new local variable.
|
static interface |
SoyNode.MsgBlockNode
A block node that can hold message content.
|
static interface |
SoyNode.MsgPlaceholderInitialNode
A node that can be the initial content (i.e.
|
static interface |
SoyNode.MsgSubstUnitNode
A substitution unit is any non-raw-text message part, since it will be replaced when the
message is rendered.
|
static interface |
SoyNode.ParentSoyNode<N extends SoyNode>
A node in a Soy parse tree that may be a parent.
|
static interface |
SoyNode.RenderUnitNode
A node that represents an independent unit of rendering.
|
static interface |
SoyNode.SplitLevelTopNode<N extends SoyNode>
A node that represents the top of a split-level structure in the parse tree.
|
static interface |
SoyNode.StandaloneNode
A node that can legally appear as the direct child of some block node (doesn't necessarily have
to be legal as the direct child of a template).
|
static interface |
SoyNode.StatementNode
A node that represents a specific Soy statement.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractParentSoyNode<N extends SoyNode>
Abstract implementation of a ParentSoyNode.
|
class |
AbstractSoyNode
Abstract implementation of a SoyNode.
|
class |
CallBasicNode
Node representing a call to a basic template.
|
class |
CallDelegateNode
Node representing a call to a delegate template.
|
class |
CallNode
Node representing a call.
|
class |
CallParamContentNode
Node representing a 'param' with content.
|
class |
CallParamNode
Abstract node representing a 'param'.
|
class |
CallParamValueNode
Node representing a 'param' with a value expression.
|
class |
CaseOrDefaultNode
Abstract node representing a 'case' or 'default' block in 'select', 'switch' or 'plural'
statements.
|
class |
DebuggerNode
Node representing the 'debugger' statement.
|
class |
ForIfemptyNode
Node representing the 'ifempty' portion of a 'foreach' statement.
|
class |
ForNode
Node representing a 'foreach' statement.
|
class |
ForNonemptyNode
Node representing the loop portion of a 'foreach' statement.
|
class |
HtmlAttributeNode
An HtmlAttributeNode is an AST node that marks the extent of one or more html attributes.
|
class |
HtmlAttributeValueNode
An Html attributed value with optional surrounding quotation marks.
|
class |
HtmlCloseTagNode
An HtmlCloseTagNode represents a closing html tag.
|
class |
HtmlCommentNode
Node representing a HTML comment.
|
class |
HtmlOpenTagNode
An HtmlOpenTagNode represents an opening html tag.
|
class |
HtmlTagNode
Base class for html tags.
|
class |
IfCondNode
Node representing a block within an 'if' statement that has a conditional expression (i.e.
|
class |
IfElseNode
Node representing the 'else' block within an 'if' statement.
|
class |
IfNode
Node representing an 'if' statement.
|
class |
LetContentNode
Node representing a 'let' statement with content.
|
class |
LetNode
Abstract node representing a 'let' statement.
|
class |
LetValueNode
Node representing a 'let' statement with a value expression.
|
class |
LogNode
Node representing the 'log' statement.
|
class |
MsgFallbackGroupNode
Represents one message or a pair of message and fallback message.
|
class |
MsgHtmlTagNode
Node representing an HTML tag within a
msg statement/block. |
class |
MsgNode
Node representing a 'msg' block.
|
class |
MsgPlaceholderNode
A node that is the direct child of a MsgBlockNode and will turn into a placeholder.
|
class |
MsgPluralCaseNode
Node representing a 'case' block in a 'plural' block.
|
class |
MsgPluralDefaultNode
Node representing the 'default' block in a 'plural' block.
|
class |
MsgPluralNode
Node representing a 'plural' block.
|
class |
MsgSelectCaseNode
Node representing a 'case' block in a 'select' block.
|
class |
MsgSelectDefaultNode
Node representing the 'default' block in a 'select' block.
|
class |
MsgSelectNode
Node representing a 'select' block.
|
class |
PrintDirectiveNode
Node representing a 'print' directive.
|
class |
PrintNode
Node representing a 'print' statement.
|
class |
RawTextNode
Node representing a contiguous raw text section.
|
class |
SoyFileNode
Node representing a Soy file.
|
class |
SoyFileSetNode
Node representing a Soy file set (the root of the Soy parse tree).
|
class |
SwitchCaseNode
Node representing a 'case' block in a 'switch' block.
|
class |
SwitchDefaultNode
Node representing the 'default' block in a 'switch' statement.
|
class |
SwitchNode
Node representing a 'switch' statement.
|
class |
TemplateBasicNode
Node representing a basic template.
|
class |
TemplateDelegateNode
Node representing a delegate template.
|
class |
TemplateNode
Node representing a template.
|
class |
VeLogNode
Node for a
statement. |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Node> |
SoyTreeUtils.getAllNodesOfType(Node rootSoyNode,
Class<T> classObject)
Retrieves all nodes in a tree that are an instance of a particular class.
|
| Modifier and Type | Method and Description |
|---|---|
static <T extends Node> |
SoyTreeUtils.getAllNodesOfType(Node rootSoyNode,
Class<T> classObject)
Retrieves all nodes in a tree that are an instance of a particular class.
|
int |
CallParamContentNode.getChildIndex(Node child) |
int |
LetContentNode.getChildIndex(Node child) |
int |
AbstractParentSoyNode.getChildIndex(Node child) |
static boolean |
SoyTreeUtils.hasHtmlNodes(Node node)
Returns true if the given
node contains any children that are HTML nodes. |
static boolean |
SoyTreeUtils.hasNodesOfType(Node node,
Class<? extends Node>... types)
Returns true if the given
node contains any children of the given types. |
static void |
SoyTreeUtils.visitAllNodes(Node node,
NodeVisitor<? super Node,SoyTreeUtils.VisitDirective> visitor)
Runs the visitor on all nodes (including
expr nodes) reachable from the given
node. |
| Modifier and Type | Method and Description |
|---|---|
static String |
SoyTreeUtils.toSourceString(List<? extends Node> nodes) |
static void |
SoyTreeUtils.visitAllNodes(Node node,
NodeVisitor<? super Node,SoyTreeUtils.VisitDirective> visitor)
Runs the visitor on all nodes (including
expr nodes) reachable from the given
node. |