Examples of parseRaw()


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

    // The reflection one will be used for other properties...
    expr = parser.parseRaw("new String('hello').CASE_INSENSITIVE_ORDER");
    Object o = expr.getValue(ctx);
    assertNotNull(o);

    expr = parser.parseRaw("new String('hello').flibbles");
    expr.setValue(ctx, 99);
    i = expr.getValue(ctx, Integer.class);
    assertEquals((int) i, 99);

    // Cannot set it to a string value
View Full Code Here

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.