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[]dataMost 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 voidaccept(NodeVisitor visitor)char[]getData()voidrender(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:
renderin interfaceRenderableNode- Specified by:
renderin classAbstractRenderableNode- Throws:
java.io.IOException
-
accept
public void accept(NodeVisitor visitor)
- Specified by:
acceptin interfaceNode- Specified by:
acceptin classAbstractRenderableNode
-
getData
public char[] getData()
-
-