Top Description Fields Constructors Methods
org.antlr.stringtemplate.language

public abstract Class Expr

extends Object
Class Inheritance
Known Direct Subclasses
org.antlr.stringtemplate.language.StringRef, org.antlr.stringtemplate.language.ASTExpr
Imports
org.antlr.stringtemplate.StringTemplate, .StringTemplateGroup, .StringTemplateWriter, java.io.Writer, .IOException, java.util.Hashtable, .Enumeration

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

Modifier and TypeField and Description
protected StringTemplate
enclosingTemplate

The StringTemplate object surrounding this expr

protected 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

AccessConstructor and Description
public
Expr(StringTemplate enclosingTemplate)

Method Summary

Modifier and TypeMethod and Description
public StringTemplate
public String
public void
setIndentation(String indentation)

public abstract int
write(StringTemplate self, StringTemplateWriter out)

How to write this node to output; return how many char written

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

enclosingTemplateback to summary
protected StringTemplate enclosingTemplate

The StringTemplate object surrounding this expr

indentationback to summary
protected 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

Exprback to summary
public Expr(StringTemplate enclosingTemplate)

Method Detail

getEnclosingTemplateback to summary
public StringTemplate getEnclosingTemplate()
getIndentationback to summary
public String getIndentation()
setIndentationback to summary
public void setIndentation(String indentation)
writeback to summary
public abstract int write(StringTemplate self, StringTemplateWriter out) throws IOException

How to write this node to output; return how many char written