public class OpenToken extends TemplateToken
TokenType.OPEN
Constructor and Description |
---|
OpenToken(java.lang.String tag,
java.lang.String id,
java.lang.String componentType,
org.apache.hivemind.Location location)
Creates a new token with the given tag, id and type
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(java.lang.String name,
java.lang.String value) |
protected void |
extendDescription(org.apache.hivemind.util.ToStringBuilder builder)
Overridden in subclasses to append additional fields (defined in the subclass) to the
description.
|
java.util.Map |
getAttributesMap()
Returns a Map of attributes.
|
java.lang.String |
getComponentType()
Returns the specified component type, or null for a component where the type is not defined
in the template.
|
java.lang.String |
getId()
Returns the id for the component.
|
java.lang.String |
getTag()
Returns the tag used to represent the component within the template.
|
getLocation, getType, toString
public OpenToken(java.lang.String tag, java.lang.String id, java.lang.String componentType, org.apache.hivemind.Location location)
tag
- the template tag which represents the component, typically "span"id
- the id for the component, which may be assigned by the template parser for
implicit componentscomponentType
- the type of component, if an implicit component, or null for a specified componentlocation
- location of tag represented by this tokenpublic java.lang.String getId()
public java.lang.String getTag()
public java.lang.String getComponentType()
public void addAttribute(java.lang.String name, java.lang.String value)
public java.util.Map getAttributesMap()
protected void extendDescription(org.apache.hivemind.util.ToStringBuilder builder)
TemplateToken
extendDescription
in class TemplateToken