Package io.pebbletemplates.pebble.node
Class TextNode
- java.lang.Object
-
- io.pebbletemplates.pebble.node.AbstractRenderableNode
-
- io.pebbletemplates.pebble.node.TextNode
-
- All Implemented Interfaces:
Node
,RenderableNode
public class TextNode extends AbstractRenderableNode
Represents static text in a template.
-
-
Field Summary
Fields Modifier and Type Field Description private char[]
data
Most Writers will convert strings to char[] so we might as well store it as a char[] to begin with; small performance optimization.
-
Constructor Summary
Constructors Constructor Description TextNode(java.lang.String text, int lineNumber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(NodeVisitor visitor)
char[]
getData()
void
render(PebbleTemplateImpl self, java.io.Writer writer, EvaluationContextImpl context)
-
Methods inherited from class io.pebbletemplates.pebble.node.AbstractRenderableNode
getLineNumber, setLineNumber
-
-
-
-
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
-
getData
public char[] getData()
-
-