Class OutputExpressionInlinePreProcessorHandler

java.lang.Object
org.thymeleaf.standard.inline.OutputExpressionInlinePreProcessorHandler
All Implemented Interfaces:
IInlinePreProcessorHandler

public final class OutputExpressionInlinePreProcessorHandler extends Object implements IInlinePreProcessorHandler

Class in charge of performing the required event transformations on templates or fragments being parsed so that output expressions are treated as normal element-oriented parsing events.

Note this class is meant for internal use only.

Since:
3.0.0
  • Field Details

    • DEFAULT_LEVELS_SIZE

      private static final int DEFAULT_LEVELS_SIZE
      See Also:
    • next

      private final IInlinePreProcessorHandler next
    • standardDialectPrefix

      private final String standardDialectPrefix
    • inlineAttributeNames

      private final String[] inlineAttributeNames
    • blockElementName

      private final char[] blockElementName
    • escapedTextAttributeName

      private final String escapedTextAttributeName
    • unescapedTextAttributeName

      private final String unescapedTextAttributeName
    • execLevel

      private int execLevel
    • inlineTemplateModes

      private TemplateMode[] inlineTemplateModes
    • inlineExecLevels

      private int[] inlineExecLevels
    • inlineIndex

      private int inlineIndex
    • attributeBuffer

      private char[] attributeBuffer
  • Constructor Details

  • Method Details

    • handleText

      public void handleText(char[] buffer, int offset, int len, int line, int col)
      Specified by:
      handleText in interface IInlinePreProcessorHandler
    • handleStandaloneElementStart

      public void handleStandaloneElementStart(char[] buffer, int nameOffset, int nameLen, boolean minimized, int line, int col)
      Specified by:
      handleStandaloneElementStart in interface IInlinePreProcessorHandler
    • handleStandaloneElementEnd

      public void handleStandaloneElementEnd(char[] buffer, int nameOffset, int nameLen, boolean minimized, int line, int col)
      Specified by:
      handleStandaloneElementEnd in interface IInlinePreProcessorHandler
    • handleOpenElementStart

      public void handleOpenElementStart(char[] buffer, int nameOffset, int nameLen, int line, int col)
      Specified by:
      handleOpenElementStart in interface IInlinePreProcessorHandler
    • handleOpenElementEnd

      public void handleOpenElementEnd(char[] buffer, int nameOffset, int nameLen, int line, int col)
      Specified by:
      handleOpenElementEnd in interface IInlinePreProcessorHandler
    • handleAutoOpenElementStart

      public void handleAutoOpenElementStart(char[] buffer, int nameOffset, int nameLen, int line, int col)
      Specified by:
      handleAutoOpenElementStart in interface IInlinePreProcessorHandler
    • handleAutoOpenElementEnd

      public void handleAutoOpenElementEnd(char[] buffer, int nameOffset, int nameLen, int line, int col)
      Specified by:
      handleAutoOpenElementEnd in interface IInlinePreProcessorHandler
    • handleCloseElementStart

      public void handleCloseElementStart(char[] buffer, int nameOffset, int nameLen, int line, int col)
      Specified by:
      handleCloseElementStart in interface IInlinePreProcessorHandler
    • handleCloseElementEnd

      public void handleCloseElementEnd(char[] buffer, int nameOffset, int nameLen, int line, int col)
      Specified by:
      handleCloseElementEnd in interface IInlinePreProcessorHandler
    • handleAutoCloseElementStart

      public void handleAutoCloseElementStart(char[] buffer, int nameOffset, int nameLen, int line, int col)
      Specified by:
      handleAutoCloseElementStart in interface IInlinePreProcessorHandler
    • handleAutoCloseElementEnd

      public void handleAutoCloseElementEnd(char[] buffer, int nameOffset, int nameLen, int line, int col)
      Specified by:
      handleAutoCloseElementEnd in interface IInlinePreProcessorHandler
    • handleAttribute

      public void handleAttribute(char[] buffer, int nameOffset, int nameLen, int nameLine, int nameCol, int operatorOffset, int operatorLen, int operatorLine, int operatorCol, int valueContentOffset, int valueContentLen, int valueOuterOffset, int valueOuterLen, int valueLine, int valueCol)
      Specified by:
      handleAttribute in interface IInlinePreProcessorHandler
    • increaseExecLevel

      private void increaseExecLevel()
    • decreaseExecLevel

      private void decreaseExecLevel()
    • isInlineAttribute

      private boolean isInlineAttribute(char[] buffer, int nameOffset, int nameLen)
    • setInlineTemplateMode

      private void setInlineTemplateMode(TemplateMode templateMode)
    • computeAssociatedTemplateMode

      private static TemplateMode computeAssociatedTemplateMode(String inlineModeAttributeValue)
    • mightNeedInlining

      private static boolean mightNeedInlining(char[] buffer, int offset, int len)
    • performInlining

      private void performInlining(char[] text, int offset, int len, int line, int col)
    • countChar

      private static void countChar(int[] locator, char c)
    • findNextStructureStart

      private static int findNextStructureStart(char[] text, int offset, int maxi, int[] locator)
    • findNextStructureEndAvoidQuotes

      private static int findNextStructureEndAvoidQuotes(char[] text, int offset, int maxi, char innerClosingChar, int[] locator)
    • prepareAttributeBuffer

      private void prepareAttributeBuffer(String attributeName, char[] valueText, int valueOffset, int valueLen)