Package org.springframework.expression.common

Examples of org.springframework.expression.common.CompositeStringExpression


    assertEquals("hello 4 world",s);

    // not a useful expression but tests nested expression syntax that clashes with template prefix/suffix
    ex = parser.parseExpression("hello ${listOfNumbersUpToTen.$[#root.listOfNumbersUpToTen.$[#this%2==1]==3]} world",DEFAULT_TEMPLATE_PARSER_CONTEXT);
    assertEquals(CompositeStringExpression.class,ex.getClass());
    CompositeStringExpression cse = (CompositeStringExpression)ex;
    Expression[] exprs = cse.getExpressions();
    assertEquals(3,exprs.length);
    assertEquals("listOfNumbersUpToTen.$[#root.listOfNumbersUpToTen.$[#this%2==1]==3]",exprs[1].getExpressionString());
    s = ex.getValue(TestScenarioCreator.getTestEvaluationContext(),String.class);
    assertEquals("hello  world",s);
View Full Code Here

TOP

Related Classes of org.springframework.expression.common.CompositeStringExpression

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.