Interface IElementTag
-
- All Superinterfaces:
ITemplateEvent
- All Known Subinterfaces:
ICloseElementTag,IOpenElementTag,IProcessableElementTag,IStandaloneElementTag
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.
- Since:
- 3.0.0
- Author:
- Daniel Fernández
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetElementCompleteName()Returns the complete name of the element (including prefix) as a String.ElementDefinitiongetElementDefinition()Returns theElementDefinitioncorresponding to this tag.TemplateModegetTemplateMode()Returns the template mode to which this element tag is linked.booleanisSynthetic()Returns whether the tag is synthetic (i.e.-
Methods inherited from interface org.thymeleaf.model.ITemplateEvent
accept, getCol, getLine, getTemplateName, hasLocation, write
-
-
-
-
Method Detail
-
getTemplateMode
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
IModelobjects that do not match this template mode.- Returns:
- the template mode.
-
getElementCompleteName
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.
- Returns:
- the element complete name.
-
getElementDefinition
ElementDefinition getElementDefinition()
Returns the
ElementDefinitioncorresponding to this tag.The element definition contains several metadata related to the element. For example, if the template mode is
TemplateMode1.html, an element definition could specify whether the element is void or not (i.e. should be expected to have a body).- Returns:
- the element definition.
-
isSynthetic
boolean isSynthetic()
Returns whether the tag is synthetic (i.e. not originally present in a template, but rather a tag balancing artifact).
- Returns:
- whether the tag is synthetic or not.
-
-