Class CommentProcessorTextHandler
- java.lang.Object
-
- org.thymeleaf.templateparser.text.AbstractTextHandler
-
- org.thymeleaf.templateparser.text.AbstractChainedTextHandler
-
- org.thymeleaf.templateparser.text.CommentProcessorTextHandler
-
- All Implemented Interfaces:
ITextHandler
final class CommentProcessorTextHandler extends AbstractChainedTextHandler
-
-
Field Summary
Fields Modifier and Type Field Description private char[]filteredTextBufferprivate int[]filteredTextLocatorprivate intfilteredTextSizeprivate booleanfilterTextsprivate booleanstandardDialectPresent
-
Constructor Summary
Constructors Constructor Description CommentProcessorTextHandler(boolean standardDialectPresent, ITextHandler handler)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static intcomputeFilterOffset(char[] buffer, int offset, int maxi, int[] locator)private voidfilterText(char[] buffer, int offset, int len, int line, int col)voidhandleCloseElementStart(char[] buffer, int nameOffset, int nameLen, int line, int col)voidhandleComment(char[] buffer, int contentOffset, int contentLen, int outerOffset, int outerLen, int line, int col)voidhandleDocumentEnd(long endTimeNanos, long totalTimeNanos, int line, int col)voidhandleOpenElementStart(char[] buffer, int nameOffset, int nameLen, int line, int col)voidhandleStandaloneElementStart(char[] buffer, int nameOffset, int nameLen, boolean minimized, int line, int col)voidhandleText(char[] buffer, int offset, int len, int line, int col)private booleanisCommentProcessable(char[] buffer, int contentOffset, int contentLen)private voidprocessFilteredTexts()-
Methods inherited from class org.thymeleaf.templateparser.text.AbstractChainedTextHandler
getNext, handleAttribute, handleCloseElementEnd, handleDocumentStart, handleOpenElementEnd, handleStandaloneElementEnd
-
-
-
-
Constructor Detail
-
CommentProcessorTextHandler
CommentProcessorTextHandler(boolean standardDialectPresent, ITextHandler handler)
-
-
Method Detail
-
handleDocumentEnd
public void handleDocumentEnd(long endTimeNanos, long totalTimeNanos, int line, int col) throws TextParseException- Specified by:
handleDocumentEndin interfaceITextHandler- Overrides:
handleDocumentEndin classAbstractChainedTextHandler- Throws:
TextParseException
-
handleComment
public void handleComment(char[] buffer, int contentOffset, int contentLen, int outerOffset, int outerLen, int line, int col) throws TextParseException- Specified by:
handleCommentin interfaceITextHandler- Overrides:
handleCommentin classAbstractChainedTextHandler- Throws:
TextParseException
-
isCommentProcessable
private boolean isCommentProcessable(char[] buffer, int contentOffset, int contentLen)
-
handleText
public void handleText(char[] buffer, int offset, int len, int line, int col) throws TextParseException- Specified by:
handleTextin interfaceITextHandler- Overrides:
handleTextin classAbstractChainedTextHandler- Throws:
TextParseException
-
filterText
private void filterText(char[] buffer, int offset, int len, int line, int col)
-
processFilteredTexts
private void processFilteredTexts() throws TextParseException- Throws:
TextParseException
-
handleStandaloneElementStart
public void handleStandaloneElementStart(char[] buffer, int nameOffset, int nameLen, boolean minimized, int line, int col) throws TextParseException- Specified by:
handleStandaloneElementStartin interfaceITextHandler- Overrides:
handleStandaloneElementStartin classAbstractChainedTextHandler- Throws:
TextParseException
-
handleOpenElementStart
public void handleOpenElementStart(char[] buffer, int nameOffset, int nameLen, int line, int col) throws TextParseException- Specified by:
handleOpenElementStartin interfaceITextHandler- Overrides:
handleOpenElementStartin classAbstractChainedTextHandler- Throws:
TextParseException
-
handleCloseElementStart
public void handleCloseElementStart(char[] buffer, int nameOffset, int nameLen, int line, int col) throws TextParseException- Specified by:
handleCloseElementStartin interfaceITextHandler- Overrides:
handleCloseElementStartin classAbstractChainedTextHandler- Throws:
TextParseException
-
computeFilterOffset
private static int computeFilterOffset(char[] buffer, int offset, int maxi, int[] locator)
-
-