Package org.thymeleaf.engine
Class AbstractTemplateEvent
- java.lang.Object
-
- org.thymeleaf.engine.AbstractTemplateEvent
-
- All Implemented Interfaces:
ITemplateEvent
- Direct Known Subclasses:
AbstractElementTag,AbstractTextualTemplateEvent,DocType,ProcessingInstruction,TemplateEnd,TemplateStart,XMLDeclaration
abstract class AbstractTemplateEvent extends java.lang.Object implements ITemplateEvent
- Since:
- 3.0.0
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intcol(package private) intline(package private) java.lang.StringtemplateName
-
Constructor Summary
Constructors Constructor Description AbstractTemplateEvent()AbstractTemplateEvent(java.lang.String templateName, int line, int col)AbstractTemplateEvent(AbstractTemplateEvent original)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCol()Returns the column at which this event can be found in the template specified byITemplateEvent.getTemplateName().intgetLine()Returns the line at which this event can be found in the template specified byITemplateEvent.getTemplateName().java.lang.StringgetTemplateName()Returns the name of the template from which parsing this event was originally created.booleanhasLocation()Checks whether this event contains location information (template name, line and column).-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.thymeleaf.model.ITemplateEvent
accept, write
-
-
-
-
Constructor Detail
-
AbstractTemplateEvent
AbstractTemplateEvent()
-
AbstractTemplateEvent
AbstractTemplateEvent(java.lang.String templateName, int line, int col)
-
AbstractTemplateEvent
AbstractTemplateEvent(AbstractTemplateEvent original)
-
-
Method Detail
-
hasLocation
public final boolean hasLocation()
Description copied from interface:ITemplateEventChecks whether this event contains location information (template name, line and column).
Only events that are generated during the parsing of templates contain location info, locating them in their original template. All events generated during template processing and not originally present at the template do not contain this location data.
- Specified by:
hasLocationin interfaceITemplateEvent- Returns:
- whether the event contains location data or not.
-
getTemplateName
public final java.lang.String getTemplateName()
Description copied from interface:ITemplateEventReturns the name of the template from which parsing this event was originally created.
- Specified by:
getTemplateNamein interfaceITemplateEvent- Returns:
- the name of the template
-
getLine
public final int getLine()
Description copied from interface:ITemplateEventReturns the line at which this event can be found in the template specified by
ITemplateEvent.getTemplateName().- Specified by:
getLinein interfaceITemplateEvent- Returns:
- the line number, starting in 1.
-
getCol
public final int getCol()
Description copied from interface:ITemplateEventReturns the column at which this event can be found in the template specified by
ITemplateEvent.getTemplateName().- Specified by:
getColin interfaceITemplateEvent- Returns:
- the column number, starting in 1.
-
-