public interface IElementTag extends ITemplateEvent
Event interface defining an element tag (open, close or standalone).
Note that any implementations of this interface should be immutable.
Modifier and Type | Method and Description |
---|---|
String |
getElementCompleteName()
Returns the complete name of the element (including prefix) as a String.
|
ElementDefinition |
getElementDefinition()
Returns the
ElementDefinition corresponding to this tag. |
TemplateMode |
getTemplateMode()
Returns the template mode to which this element tag is linked.
|
boolean |
isSynthetic()
Returns whether the tag is synthetic (i.e.
|
accept, getCol, getLine, getTemplateName, hasLocation, write
TemplateMode getTemplateMode()
Returns the template mode to which this element tag is linked.
Element tags are created for a specific template mode and cannot be added to IModel
objects that do not match this template mode.
String getElementCompleteName()
Returns the complete name of the element (including prefix) as a String.
If this event models a tag that was actually parsed from a template, this value will represent the exact way in which the element name was written in the template.
ElementDefinition getElementDefinition()
Returns the ElementDefinition
corresponding to this tag.
The element definition contains several metadata related to the element. For example, if the
template mode is TemplateMode.HTML
, an element definition could specify whether the
element is void or not (i.e. should be expected to have a body).
boolean isSynthetic()
Returns whether the tag is synthetic (i.e. not originally present in a template, but rather a tag balancing artifact).
Copyright © 2016 The THYMELEAF team. All rights reserved.