Package io.pebbletemplates.pebble.node
Class BodyNode
- java.lang.Object
-
- io.pebbletemplates.pebble.node.AbstractRenderableNode
-
- io.pebbletemplates.pebble.node.BodyNode
-
- All Implemented Interfaces:
Node
,RenderableNode
public class BodyNode extends AbstractRenderableNode
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<RenderableNode>
children
private static java.util.List<java.lang.Class<? extends Node>>
nodesToRenderInChild
private boolean
onlyRenderInheritanceSafeNodes
When a template extends a parent template there are very few nodes in the child that should actually get rendered such as set and import.
-
Constructor Summary
Constructors Constructor Description BodyNode(int lineNumber, java.util.List<RenderableNode> children)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(NodeVisitor visitor)
java.util.List<RenderableNode>
getChildren()
boolean
isOnlyRenderInheritanceSafeNodes()
void
render(PebbleTemplateImpl self, java.io.Writer writer, EvaluationContextImpl context)
void
setOnlyRenderInheritanceSafeNodes(boolean onlyRenderInheritanceSafeNodes)
-
Methods inherited from class io.pebbletemplates.pebble.node.AbstractRenderableNode
getLineNumber, setLineNumber
-
-
-
-
Field Detail
-
children
private final java.util.List<RenderableNode> children
-
onlyRenderInheritanceSafeNodes
private boolean onlyRenderInheritanceSafeNodes
When a template extends a parent template there are very few nodes in the child that should actually get rendered such as set and import. All others should be ignored.
-
nodesToRenderInChild
private static java.util.List<java.lang.Class<? extends Node>> nodesToRenderInChild
-
-
Constructor Detail
-
BodyNode
public BodyNode(int lineNumber, java.util.List<RenderableNode> children)
-
-
Method Detail
-
render
public void render(PebbleTemplateImpl self, java.io.Writer writer, EvaluationContextImpl context) throws java.io.IOException
- Specified by:
render
in interfaceRenderableNode
- Specified by:
render
in classAbstractRenderableNode
- Throws:
java.io.IOException
-
accept
public void accept(NodeVisitor visitor)
- Specified by:
accept
in interfaceNode
- Specified by:
accept
in classAbstractRenderableNode
-
getChildren
public java.util.List<RenderableNode> getChildren()
-
isOnlyRenderInheritanceSafeNodes
public boolean isOnlyRenderInheritanceSafeNodes()
-
setOnlyRenderInheritanceSafeNodes
public void setOnlyRenderInheritanceSafeNodes(boolean onlyRenderInheritanceSafeNodes)
-
-