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

public Class StringRef

extends Expr
Class Inheritance
Known Direct Subclasses
org.antlr.stringtemplate.language.NewlineRef
Imports
org.antlr.stringtemplate.StringTemplate, .StringTemplateWriter, java.io.IOException

Represents a chunk of just simple text to spit out; nothing to "evaluate"

Field Summary

Modifier and TypeField and Description
pack-priv String
Inherited from org.antlr.stringtemplate.language.Expr:
enclosingTemplateindentation

Constructor Summary

AccessConstructor and Description
public
StringRef(StringTemplate enclosingTemplate, String str)

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public int
write(StringTemplate self, StringTemplateWriter out)

Implements abstract org.antlr.stringtemplate.language.Expr.write.

Just print out the string; no reference to self because this is a literal--not sensitive to attribute values.
Inherited from org.antlr.stringtemplate.language.Expr:
getEnclosingTemplategetIndentationsetIndentation

Field Detail

strback to summary
pack-priv String str

Constructor Detail

StringRefback to summary
public StringRef(StringTemplate enclosingTemplate, String str)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

writeback to summary
public int write(StringTemplate self, StringTemplateWriter out) throws IOException

Implements abstract org.antlr.stringtemplate.language.Expr.write.

Just print out the string; no reference to self because this is a literal--not sensitive to attribute values. These strings never wrap because they are not part of an <...> expression. <"foo"; wrap="\n"> should wrap though if necessary.