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>childrenprivate static java.util.List<java.lang.Class<? extends Node>>nodesToRenderInChildprivate booleanonlyRenderInheritanceSafeNodesWhen 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 voidaccept(NodeVisitor visitor)java.util.List<RenderableNode>getChildren()booleanisOnlyRenderInheritanceSafeNodes()voidrender(PebbleTemplateImpl self, java.io.Writer writer, EvaluationContextImpl context)voidsetOnlyRenderInheritanceSafeNodes(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:
renderin interfaceRenderableNode- Specified by:
renderin classAbstractRenderableNode- Throws:
java.io.IOException
-
accept
public void accept(NodeVisitor visitor)
- Specified by:
acceptin interfaceNode- Specified by:
acceptin classAbstractRenderableNode
-
getChildren
public java.util.List<RenderableNode> getChildren()
-
isOnlyRenderInheritanceSafeNodes
public boolean isOnlyRenderInheritanceSafeNodes()
-
setOnlyRenderInheritanceSafeNodes
public void setOnlyRenderInheritanceSafeNodes(boolean onlyRenderInheritanceSafeNodes)
-
-