Class AbstractElementTag
- All Implemented Interfaces:
IElementTag,ITemplateEvent
- Direct Known Subclasses:
AbstractProcessableElementTag,CloseElementTag
- Since:
- 3.0.0
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final String(package private) final ElementDefinition(package private) final boolean(package private) final TemplateModeFields inherited from class org.thymeleaf.engine.AbstractTemplateEvent
col, line, templateName -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractElementTag(TemplateMode templateMode, ElementDefinition elementDefinition, String elementCompleteName, boolean synthetic) protectedAbstractElementTag(TemplateMode templateMode, ElementDefinition elementDefinition, String elementCompleteName, boolean synthetic, String templateName, int line, int col) -
Method Summary
Modifier and TypeMethodDescriptionfinal StringReturns the complete name of the element (including prefix) as a String.final ElementDefinitionReturns theElementDefinitioncorresponding to this tag.final TemplateModeReturns the template mode to which this element tag is linked.final booleanReturns whether the tag is synthetic (i.e.final StringtoString()Methods inherited from class org.thymeleaf.engine.AbstractTemplateEvent
getCol, getLine, getTemplateName, hasLocationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.thymeleaf.model.ITemplateEvent
accept, getCol, getLine, getTemplateName, hasLocation, write
-
Field Details
-
templateMode
-
elementDefinition
-
elementCompleteName
-
synthetic
final boolean synthetic
-
-
Constructor Details
-
AbstractElementTag
protected AbstractElementTag(TemplateMode templateMode, ElementDefinition elementDefinition, String elementCompleteName, boolean synthetic) -
AbstractElementTag
protected AbstractElementTag(TemplateMode templateMode, ElementDefinition elementDefinition, String elementCompleteName, boolean synthetic, String templateName, int line, int col)
-
-
Method Details
-
getTemplateMode
Description copied from interface:IElementTagReturns 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.- Specified by:
getTemplateModein interfaceIElementTag- Returns:
- the template mode.
-
getElementCompleteName
Description copied from interface:IElementTagReturns 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.
- Specified by:
getElementCompleteNamein interfaceIElementTag- Returns:
- the element complete name.
-
getElementDefinition
Description copied from interface:IElementTagReturns the
ElementDefinitioncorresponding 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).- Specified by:
getElementDefinitionin interfaceIElementTag- Returns:
- the element definition.
-
isSynthetic
public final boolean isSynthetic()Description copied from interface:IElementTagReturns whether the tag is synthetic (i.e. not originally present in a template, but rather a tag balancing artifact).
- Specified by:
isSyntheticin interfaceIElementTag- Returns:
- whether the tag is synthetic or not.
-
toString
-