Class OutputExpressionInlinePreProcessorHandler

  • All Implemented Interfaces:
    IInlinePreProcessorHandler

    public final class OutputExpressionInlinePreProcessorHandler
    extends java.lang.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 Detail

      • standardDialectPrefix

        private final java.lang.String standardDialectPrefix
      • inlineAttributeNames

        private final java.lang.String[] inlineAttributeNames
      • blockElementName

        private final char[] blockElementName
      • escapedTextAttributeName

        private final java.lang.String escapedTextAttributeName
      • unescapedTextAttributeName

        private final java.lang.String unescapedTextAttributeName
      • execLevel

        private int execLevel
      • inlineTemplateModes

        private TemplateMode[] inlineTemplateModes
      • inlineExecLevels

        private int[] inlineExecLevels
      • inlineIndex

        private int inlineIndex
      • attributeBuffer

        private char[] attributeBuffer
    • Method Detail

      • 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​(java.lang.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​(java.lang.String attributeName,
                                            char[] valueText,
                                            int valueOffset,
                                            int valueLen)