- All Known Implementing Classes:
ExpressionNode,LineSeparatorNode,ParameterDeclarationNode,SectionNode,TextNode
public interface TemplateNode
Tree node of a parsed template.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic interfaceRepresents an origin of a template node. -
Method Summary
Modifier and TypeMethodDescriptiondefault ExpressionNodedefault ParameterDeclarationNodedefault SectionNodedefault TextNodeasText()default List<Expression> default List<ParameterDeclaration> Returns the parameter declarations defined in this template node.default booleanConstant means a static text or a literal output expression.default booleandefault booleandefault booleanisText()kind()Returns the kind of this node.resolve(ResolutionContext context)
-
Method Details
-
resolve
- Parameters:
context-- Returns:
- the result node
-
getExpressions
- Returns:
- a list of expressions
-
getParameterDeclarations
Returns the parameter declarations defined in this template node.- Returns:
- a list of param declarations
-
getOrigin
TemplateNode.Origin getOrigin()- Returns:
- the origin of the node
-
isConstant
default boolean isConstant()Constant means a static text or a literal output expression.- Returns:
trueif the node represents a constant- See Also:
-
isSection
default boolean isSection()- Returns:
trueif the node represents a section- See Also:
-
isText
default boolean isText()- Returns:
trueif the node represents a text- See Also:
-
isExpression
default boolean isExpression()- Returns:
trueif the node represents an output expression- See Also:
-
kind
TemplateNode.Kind kind()Returns the kind of this node.Note that comments and line separators are never preserved in the parsed template tree.
- Returns:
- the kind
-
asText
-
asSection
-
asExpression
-
asParamDeclaration
-