Package org.springframework.expression

Examples of org.springframework.expression.ParserContext


            throw new ExpressionEvaluationException(expression, e);
        }
    }

    public void setExpressionPrefix(final String prefix) {
        this.parserContext = new ParserContext() {

            String pre = prefix + "{";

            @Override
            public boolean isTemplate() {
View Full Code Here


        return evaluationContext;
    }

    private Expression parseExpression() {
        // Support template parsing with #{ } delimiters
        ParserContext parserContext = new TemplateParserContext();
        Expression expression = expressionParser.parseExpression(expressionString, parserContext);
        return expression;
    }
View Full Code Here

        return evaluationContext;
    }

    private Expression parseExpression() {
        // Support template parsing with #{ } delimiters
        ParserContext parserContext = new TemplateParserContext();
        Expression expression = expressionParser.parseExpression(expressionString, parserContext);
        return expression;
    }
View Full Code Here

    tpc = new TemplateParserContext();
    assertEquals("#{", tpc.getExpressionPrefix());
    assertEquals("}", tpc.getExpressionSuffix());
    assertTrue(tpc.isTemplate());

    ParserContext pc = ParserContext.TEMPLATE_EXPRESSION;
    assertEquals("#{", pc.getExpressionPrefix());
    assertEquals("}", pc.getExpressionSuffix());
    assertTrue(pc.isTemplate());
  }
View Full Code Here

  }


  @Test
  public void NPE_SPR5673() throws Exception {
    ParserContext hashes = TemplateExpressionParsingTests.HASH_DELIMITED_PARSER_CONTEXT;
    ParserContext dollars = TemplateExpressionParsingTests.DEFAULT_TEMPLATE_PARSER_CONTEXT;

    checkTemplateParsing("abc${'def'} ghi", "abcdef ghi");

    checkTemplateParsingError("abc${ {}( 'abc'", "Missing closing ')' for '(' at position 8");
    checkTemplateParsingError("abc${ {}[ 'abc'", "Missing closing ']' for '[' at position 8");
View Full Code Here

  ParserContext parserContext = null;
 
  @PostConstruct
  protected void initParserContext() {
    if (templatePrefix != null && templateSuffix != null) {
      parserContext = new ParserContext() {
        @Override
        public boolean isTemplate() {
          return true;
        }
        @Override
View Full Code Here

TOP

Related Classes of org.springframework.expression.ParserContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.