Class AbstractStandardInliner

    • Field Detail

      • writeTextsToOutput

        private final boolean writeTextsToOutput
    • Method Detail

      • getName

        public final java.lang.String getName()
        Description copied from interface: IInliner

        Returns an identifiable name for the inliner

        Specified by:
        getName in interface IInliner
        Returns:
        the name of the inliner.
      • inline

        public final java.lang.CharSequence inline​(ITemplateContext context,
                                                   IText text)
        Description copied from interface: IInliner

        Perform the inlining operation on an IText node.

        Specified by:
        inline in interface IInliner
        Parameters:
        context - the template context.
        text - the event to be inlined.
        Returns:
        the modified event (or the same event if no modifications were required)
      • inlineSwitchTemplateMode

        private java.lang.CharSequence inlineSwitchTemplateMode​(ITemplateContext context,
                                                                IText text)
      • inline

        public final java.lang.CharSequence inline​(ITemplateContext context,
                                                   ICDATASection cdataSection)
        Description copied from interface: IInliner

        Perform the inlining operation on an ICDATASection node.

        Specified by:
        inline in interface IInliner
        Parameters:
        context - the template context.
        cdataSection - the event to be inlined.
        Returns:
        the modified event (or the same event if no modifications were required)
      • inline

        public final java.lang.CharSequence inline​(ITemplateContext context,
                                                   IComment comment)
        Description copied from interface: IInliner

        Perform the inlining operation on an IComment node.

        Specified by:
        inline in interface IInliner
        Parameters:
        context - the template context.
        comment - the event to be inlined.
        Returns:
        the modified event (or the same event if no modifications were required)
      • inlineSwitchTemplateMode

        private java.lang.CharSequence inlineSwitchTemplateMode​(ITemplateContext context,
                                                                IComment comment)
      • performInlining

        private void performInlining​(ITemplateContext context,
                                     java.lang.CharSequence text,
                                     int offset,
                                     int len,
                                     java.lang.String templateName,
                                     int line,
                                     int col,
                                     java.lang.StringBuilder strBuilder)
      • countChar

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

        private static int findNextStructureStart​(java.lang.CharSequence text,
                                                  int offset,
                                                  int maxi,
                                                  int[] locator)
      • findNextStructureEndAvoidQuotes

        private static int findNextStructureEndAvoidQuotes​(java.lang.CharSequence text,
                                                           int offset,
                                                           int maxi,
                                                           char innerClosingChar,
                                                           int[] locator)
      • processExpression

        private java.lang.String processExpression​(ITemplateContext context,
                                                   IStandardExpressionParser expressionParser,
                                                   java.lang.String expression,
                                                   boolean escape,
                                                   java.lang.String templateName,
                                                   int line,
                                                   int col)
      • produceEscapedOutput

        protected abstract java.lang.String produceEscapedOutput​(java.lang.Object input)