freemarker.core
Class TemplateObject

java.lang.Object
  extended by freemarker.core.TemplateObject
Direct Known Subclasses:
Expression, TemplateElement

public abstract class TemplateObject
extends Object

Objects that represent instructions or expressions in the compiled tree representation of the template all descend from this abstract base class.


Constructor Summary
TemplateObject()
           
 
Method Summary
 boolean contains(int column, int line)
           
 int getBeginColumn()
           
 int getBeginLine()
           
abstract  String getCanonicalForm()
           
 int getEndColumn()
           
 int getEndLine()
           
 String getEndLocation()
           
 String getEndLocationQuoted()
          Same as getStartLocation(), but quotes the template name with StringUtil.jQuoteNoXSS(String).
 String getSource()
           
 String getStartLocation()
          Returns a string that indicates where in the template source, this object is.
 String getStartLocationQuoted()
          Same as getStartLocation(), but quotes the template name with StringUtil.jQuoteNoXSS(String).
 Template getTemplate()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TemplateObject

public TemplateObject()
Method Detail

getBeginColumn

public final int getBeginColumn()

getBeginLine

public final int getBeginLine()

getEndColumn

public final int getEndColumn()

getEndLine

public final int getEndLine()

getStartLocation

public String getStartLocation()
Returns a string that indicates where in the template source, this object is.


getStartLocationQuoted

public String getStartLocationQuoted()
Same as getStartLocation(), but quotes the template name with StringUtil.jQuoteNoXSS(String). If the template name is unknown, it uses "input" as the template name without quotation marks.


getEndLocation

public String getEndLocation()

getEndLocationQuoted

public String getEndLocationQuoted()
Same as getStartLocation(), but quotes the template name with StringUtil.jQuoteNoXSS(String). If the template name is unknown, it uses "input" as the template name without quotation marks.


getSource

public final String getSource()

toString

public String toString()
Overrides:
toString in class Object

contains

public boolean contains(int column,
                        int line)
Returns:
whether the point in the template file specified by the column and line numbers is contained within this template object.

getTemplate

public Template getTemplate()

getCanonicalForm

public abstract String getCanonicalForm()