org.apache.tapestry.parse
Class LocalizationToken

java.lang.Object
  extended by org.apache.tapestry.parse.TemplateToken
      extended by org.apache.tapestry.parse.LocalizationToken
All Implemented Interfaces:
org.apache.hivemind.Locatable

public class LocalizationToken
extends TemplateToken

Represents localized text from the template.

Since:
3.0
Author:
Howard Lewis Ship
See Also:
TokenType.LOCALIZATION

Constructor Summary
LocalizationToken(String tag, String key, boolean raw, Map attributes, org.apache.hivemind.Location location)
          Creates a new token.
 
Method Summary
protected  void extendDescription(org.apache.hivemind.util.ToStringBuilder builder)
          Overridden in subclasses to append additional fields (defined in the subclass) to the description.
 Map getAttributes()
          Returns any attributes for the token, which may be null.
 String getKey()
           
 String getTag()
           
 boolean isRaw()
           
 
Methods inherited from class org.apache.tapestry.parse.TemplateToken
getLocation, getType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalizationToken

public LocalizationToken(String tag,
                         String key,
                         boolean raw,
                         Map attributes,
                         org.apache.hivemind.Location location)
Creates a new token.

Parameters:
tag - the tag of the element from the template
key - the localization key specified
raw - if true, then the localized value contains markup that should not be escaped
attributes - any additional attributes (beyond those used to define key and raw) that were specified. This value is retained, not copied.
location - location of the tag which defines this token
Method Detail

getAttributes

public Map getAttributes()
Returns any attributes for the token, which may be null. Do not modify the return value.


isRaw

public boolean isRaw()

getTag

public String getTag()

getKey

public String getKey()

extendDescription

protected void extendDescription(org.apache.hivemind.util.ToStringBuilder builder)
Description copied from class: TemplateToken
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.

Overrides:
extendDescription in class TemplateToken


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.