Class Expr
- java.lang.Object
-
- org.antlr.stringtemplate.language.Expr
-
public abstract class Expr extends java.lang.Object
A string template expression embedded within the template. A template is parsed into a tokenized vector of Expr objects and then executed after the user sticks in attribute values. This list of Expr objects represents a "program" for the StringTemplate evaluator.
-
-
Field Summary
Fields Modifier and Type Field Description protected StringTemplate
enclosingTemplate
The StringTemplate object surrounding this exprprotected java.lang.String
indentation
Any thing spit out as a chunk (even plain text) must be indented according to whitespace before the action that generated it.
-
Constructor Summary
Constructors Constructor Description Expr(StringTemplate enclosingTemplate)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringTemplate
getEnclosingTemplate()
java.lang.String
getIndentation()
void
setIndentation(java.lang.String indentation)
abstract int
write(StringTemplate self, StringTemplateWriter out)
How to write this node to output; return how many char written
-
-
-
Field Detail
-
enclosingTemplate
protected StringTemplate enclosingTemplate
The StringTemplate object surrounding this expr
-
indentation
protected java.lang.String indentation
Any thing spit out as a chunk (even plain text) must be indented according to whitespace before the action that generated it. So, plain text in the outermost template is never indented, but the text and attribute references in a nested template will all be indented by the amount seen directly in front of the attribute reference that initiates construction of the nested template.
-
-
Constructor Detail
-
Expr
public Expr(StringTemplate enclosingTemplate)
-
-
Method Detail
-
write
public abstract int write(StringTemplate self, StringTemplateWriter out) throws java.io.IOException
How to write this node to output; return how many char written- Throws:
java.io.IOException
-
getEnclosingTemplate
public StringTemplate getEnclosingTemplate()
-
getIndentation
public java.lang.String getIndentation()
-
setIndentation
public void setIndentation(java.lang.String indentation)
-
-