Interface ITemplateEvent

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void accept​(IModelVisitor visitor)
      Accept a visitor, implementation of IModelVisitor.
      int getCol()
      Returns the column at which this event can be found in the template specified by getTemplateName().
      int getLine()
      Returns the line at which this event can be found in the template specified by getTemplateName().
      java.lang.String getTemplateName()
      Returns the name of the template from which parsing this event was originally created.
      boolean hasLocation()
      Checks whether this event contains location information (template name, line and column).
      void write​(java.io.Writer writer)
      Writes this event to the specified Writer.
    • Method Detail

      • hasLocation

        boolean 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.
      • getTemplateName

        java.lang.String getTemplateName()

        Returns the name of the template from which parsing this event was originally created.

        Returns:
        the name of the template
      • getLine

        int getLine()

        Returns the line at which this event can be found in the template specified by getTemplateName().

        Returns:
        the line number, starting in 1.
      • getCol

        int getCol()

        Returns the column at which this event can be found in the template specified by getTemplateName().

        Returns:
        the column number, starting in 1.
      • accept

        void accept​(IModelVisitor visitor)

        Accept a visitor, implementation of IModelVisitor.

        Parameters:
        visitor - the visitor.
      • write

        void write​(java.io.Writer writer)
            throws java.io.IOException

        Writes this event to the specified Writer.

        Template output performed at OutputTemplateHandler is 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:
        java.io.IOException - if an input/output exception occurs.