Class StringRef

java.lang.Object
org.antlr.stringtemplate.language.Expr
org.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"
  • Constructor Details

  • Method Details

    • write

      public int write(StringTemplate self, StringTemplateWriter out) throws 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 invalid input: '<'...> expression. invalid input: '<'"foo"; wrap="\n"> should wrap though if necessary.
      Specified by:
      write in class Expr
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object