Package org.springframework.expression.spel.standard

Examples of org.springframework.expression.spel.standard.SpelExpressionParser.parseRaw()


    SpelExpressionParser parser = new SpelExpressionParser();
    StandardEvaluationContext ctx = new StandardEvaluationContext();
    ctx.setVariable("notStatic", this.getClass().getMethod("nonStatic"));
    try {
      @SuppressWarnings("unused")
      Object v = parser.parseRaw("#notStatic()").getValue(ctx);
      fail("Should have failed with exception - cannot call non static method that way");
    } catch (SpelEvaluationException se) {
      if (se.getMessageCode() != SpelMessage.FUNCTION_MUST_BE_STATIC) {
        se.printStackTrace();
        fail("Should have failed a message about the function needing to be static, not: "
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.