Interface ITemplateEvent
- All Known Subinterfaces:
- ICDATASection,- ICloseElementTag,- IComment,- IDocType,- IElementTag,- IOpenElementTag,- IProcessableElementTag,- IProcessingInstruction,- IStandaloneElementTag,- ITemplateEnd,- ITemplateStart,- IText,- IXMLDeclaration
   Common interface for all template events generated by the parsers (and processed by the
   implementations of ITemplateHandler.
 
   Sequences of these events are used to represent templates or fragments of them, by means of
   implementations of the IModel interface.
 
Note that any implementations of this interface should be immutable.
- Since:
- 3.0.0
- Author:
- Daniel Fernández
- 
Method SummaryModifier and TypeMethodDescriptionvoidaccept(IModelVisitor visitor) Accept a visitor, implementation ofIModelVisitor.intgetCol()Returns the column at which this event can be found in the template specified bygetTemplateName().intgetLine()Returns the line at which this event can be found in the template specified bygetTemplateName().Returns the name of the template from which parsing this event was originally created.booleanChecks whether this event contains location information (template name, line and column).voidWrites this event to the specifiedWriter.
- 
Method Details- 
hasLocationboolean hasLocation()Checks 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. - Returns:
- whether the event contains location data or not.
 
- 
getTemplateNameString getTemplateName()Returns the name of the template from which parsing this event was originally created. - Returns:
- the name of the template
 
- 
getLineint getLine()Returns the line at which this event can be found in the template specified by getTemplateName().- Returns:
- the line number, starting in 1.
 
- 
getColint getCol()Returns the column at which this event can be found in the template specified by getTemplateName().- Returns:
- the column number, starting in 1.
 
- 
acceptAccept a visitor, implementation of IModelVisitor.- Parameters:
- visitor- the visitor.
 
- 
writeWrites this event to the specified Writer.Template output performed at OutputTemplateHandleris done by calling these methods at each of the events resulting from template processing.- Parameters:
- writer- the writer this event should be written to.
- Throws:
- IOException- if an input/output exception occurs.
 
 
-