Home | News | Wiki | About StringTemplate | Feedback | Support | Bugs


Latest version is 3.2.
Download now! »

Download
» Home
» Download
» News
»Using StringTemplate
» Documentation
» Wiki
» Articles
» File Sharing
» Code API
» Tech Support
»About StringTemplate
» What is it?
» Showcase
» Testimonials
» Software License
» Changes
»Feedback
»Credits
»Contact


Support StringTemplate, ANTLR Project by making a donation! Terence often pays for things like the antlr.org server, conference travel, and this site design (that alone cost US$1000). Buy him a beer and pizza remotely ;)

Search



StringRef


org.antlr.stringtemplate.language
Class StringRef

java.lang.Object
  extended byorg.antlr.stringtemplate.language.Expr
      extended byorg.antlr.stringtemplate.language.StringRef
Direct Known Subclasses:
NewlineRef

public class StringRef
extends Expr

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


Field Summary
(package private)  java.lang.String str
           
 
Fields inherited from class org.antlr.stringtemplate.language.Expr
enclosingTemplate, indentation
 
Constructor Summary
StringRef(StringTemplate enclosingTemplate, java.lang.String str)
           
 
Method Summary
 java.lang.String toString()
           
 int write(StringTemplate self, StringTemplateWriter out)
          Just print out the string; no reference to self because this is a literal--not sensitive to attribute values.
 
Methods inherited from class org.antlr.stringtemplate.language.Expr
getEnclosingTemplate, getIndentation, setIndentation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

str

java.lang.String str
Constructor Detail

StringRef

public StringRef(StringTemplate enclosingTemplate,
                 java.lang.String str)
Method Detail

write

public int write(StringTemplate self,
                 StringTemplateWriter out)
          throws java.io.IOException
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.

Specified by:
write in class Expr
Throws:
java.io.IOException

toString

public java.lang.String toString()