Class Comment

    • Field Detail

      • prefix

        final java.lang.String prefix
      • suffix

        final java.lang.String suffix
      • computedCommentStr

        private volatile java.lang.String computedCommentStr
    • Constructor Detail

      • Comment

        Comment​(java.lang.CharSequence content)
      • Comment

        Comment​(java.lang.String prefix,
                java.lang.CharSequence content,
                java.lang.String suffix)
      • Comment

        Comment​(java.lang.CharSequence content,
                java.lang.String templateName,
                int line,
                int col)
      • Comment

        Comment​(java.lang.String prefix,
                java.lang.CharSequence content,
                java.lang.String suffix,
                java.lang.String templateName,
                int line,
                int col)
    • Method Detail

      • getComment

        public java.lang.String getComment()
        Description copied from interface: IComment

        Returns the whole Comment, including the <!--...--> prefix and suffix.

        Specified by:
        getComment in interface IComment
        Returns:
        the Comment.
      • getContent

        public java.lang.String getContent()
        Description copied from interface: IComment

        Returns the content of the Comment, without the prefix or suffix.

        Specified by:
        getContent in interface IComment
        Returns:
        the content of the Comment.
      • length

        public int length()
        Specified by:
        length in interface java.lang.CharSequence
      • charAt

        public char charAt​(int index)
        Specified by:
        charAt in interface java.lang.CharSequence
      • subSequence

        public java.lang.CharSequence subSequence​(int start,
                                                  int end)
        Specified by:
        subSequence in interface java.lang.CharSequence
      • write

        public void write​(java.io.Writer writer)
                   throws java.io.IOException
        Description copied from interface: ITemplateEvent

        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.

        Specified by:
        write in interface ITemplateEvent
        Parameters:
        writer - the writer this event should be written to.
        Throws:
        java.io.IOException - if an input/output exception occurs.