org.apache.tapestry.parse
Class TemplateToken

java.lang.Object
  extended by org.apache.tapestry.parse.TemplateToken
All Implemented Interfaces:
ILocatable
Direct Known Subclasses:
CloseToken, LocalizationToken, OpenToken, TextToken

public abstract class TemplateToken
extends Object
implements ILocatable

Base class for a number of different types of tokens that can be extracted from a page/component template. This class defines the type of the token, subclasses provide interpretations on the token.

Version:
$Id: TemplateToken.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Constructor Summary
protected TemplateToken(TokenType type, ILocation location)
           
 
Method Summary
protected  void extendDescription(org.apache.commons.lang.builder.ToStringBuilder builder)
          Overridden in subclasses to append additional fields (defined in the subclass) to the description.
 ILocation getLocation()
          Returns the location from which this object orginates, or null if not known.
 TokenType getType()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TemplateToken

protected TemplateToken(TokenType type,
                        ILocation location)
Method Detail

getType

public TokenType getType()

getLocation

public ILocation getLocation()
Description copied from interface: ILocatable
Returns the location from which this object orginates, or null if not known.

Specified by:
getLocation in interface ILocatable

toString

public String toString()
Overrides:
toString in class Object

extendDescription

protected void extendDescription(org.apache.commons.lang.builder.ToStringBuilder builder)
Overridden in subclasses to append additional fields (defined in the subclass) to the description. Subclasses may override this method without invoking this implementation, which is empty.

Since:
3.0