Class AbstractElementTag
- java.lang.Object
-
- org.thymeleaf.engine.AbstractTemplateEvent
-
- org.thymeleaf.engine.AbstractElementTag
-
- All Implemented Interfaces:
IElementTag,ITemplateEvent
- Direct Known Subclasses:
AbstractProcessableElementTag,CloseElementTag
abstract class AbstractElementTag extends AbstractTemplateEvent implements IElementTag
- Since:
- 3.0.0
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.StringelementCompleteName(package private) ElementDefinitionelementDefinition(package private) booleansynthetic(package private) TemplateModetemplateMode-
Fields inherited from class org.thymeleaf.engine.AbstractTemplateEvent
col, line, templateName
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractElementTag(TemplateMode templateMode, ElementDefinition elementDefinition, java.lang.String elementCompleteName, boolean synthetic)protectedAbstractElementTag(TemplateMode templateMode, ElementDefinition elementDefinition, java.lang.String elementCompleteName, boolean synthetic, java.lang.String templateName, int line, int col)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.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.java.lang.StringtoString()-
Methods inherited from class org.thymeleaf.engine.AbstractTemplateEvent
getCol, getLine, getTemplateName, hasLocation
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.thymeleaf.model.ITemplateEvent
accept, getCol, getLine, getTemplateName, hasLocation, write
-
-
-
-
Field Detail
-
templateMode
final TemplateMode templateMode
-
elementDefinition
final ElementDefinition elementDefinition
-
elementCompleteName
final java.lang.String elementCompleteName
-
synthetic
final boolean synthetic
-
-
Constructor Detail
-
AbstractElementTag
protected AbstractElementTag(TemplateMode templateMode, ElementDefinition elementDefinition, java.lang.String elementCompleteName, boolean synthetic)
-
AbstractElementTag
protected AbstractElementTag(TemplateMode templateMode, ElementDefinition elementDefinition, java.lang.String elementCompleteName, boolean synthetic, java.lang.String templateName, int line, int col)
-
-
Method Detail
-
getTemplateMode
public final TemplateMode 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
public final java.lang.String 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
public final ElementDefinition 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
public final java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-