Package org.thymeleaf.engine
Class Comment
java.lang.Object
org.thymeleaf.engine.AbstractTemplateEvent
org.thymeleaf.engine.AbstractTextualTemplateEvent
org.thymeleaf.engine.Comment
- All Implemented Interfaces:
CharSequence,IEngineTemplateEvent,IComment,ITemplateEvent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate String(package private) final String(package private) final StringFields inherited from class org.thymeleaf.engine.AbstractTemplateEvent
col, line, templateName -
Constructor Summary
ConstructorsConstructorDescriptionComment(CharSequence content) Comment(CharSequence content, String templateName, int line, int col) Comment(String prefix, CharSequence content, String suffix) Comment(String prefix, CharSequence content, String suffix, String templateName, int line, int col) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IModelVisitor visitor) Accept a visitor, implementation ofIModelVisitor.(package private) static CommentasEngineComment(IComment comment) voidbeHandled(ITemplateHandler handler) charcharAt(int index) Returns the whole Comment, including the<!--...-->prefix and suffix.Returns the content of the Comment, without the prefix or suffix.intlength()subSequence(int start, int end) toString()voidWrites this event to the specifiedWriter.Methods inherited from class org.thymeleaf.engine.AbstractTextualTemplateEvent
charAtContent, contentSubSequence, getContentLength, getContentText, isInlineable, isWhitespace, writeContentMethods inherited from class org.thymeleaf.engine.AbstractTemplateEvent
getCol, getLine, getTemplateName, hasLocationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
chars, codePointsMethods inherited from interface org.thymeleaf.model.ITemplateEvent
getCol, getLine, getTemplateName, hasLocation
-
Field Details
-
COMMENT_PREFIX
- See Also:
-
COMMENT_SUFFIX
- See Also:
-
prefix
-
suffix
-
computedCommentStr
-
-
Constructor Details
-
Comment
Comment(CharSequence content) -
Comment
Comment(String prefix, CharSequence content, String suffix) -
Comment
Comment(CharSequence content, String templateName, int line, int col) -
Comment
Comment(String prefix, CharSequence content, String suffix, String templateName, int line, int col)
-
-
Method Details
-
getComment
Description copied from interface:ICommentReturns the whole Comment, including the
<!--...-->prefix and suffix.- Specified by:
getCommentin interfaceIComment- Returns:
- the Comment.
-
getContent
Description copied from interface:ICommentReturns the content of the Comment, without the prefix or suffix.
- Specified by:
getContentin interfaceIComment- Returns:
- the content of the Comment.
-
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
accept
Description copied from interface:ITemplateEventAccept a visitor, implementation of
IModelVisitor.- Specified by:
acceptin interfaceITemplateEvent- Parameters:
visitor- the visitor.
-
write
Description copied from interface:ITemplateEventWrites 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.- Specified by:
writein interfaceITemplateEvent- Parameters:
writer- the writer this event should be written to.- Throws:
IOException- if an input/output exception occurs.
-
asEngineComment
-
beHandled
- Specified by:
beHandledin interfaceIEngineTemplateEvent
-
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classAbstractTextualTemplateEvent
-