Package org.springframework.expression.spel.ast

Examples of org.springframework.expression.spel.ast.Ternary


        }
        nextToken();
        SpelNodeImpl ifTrueExprValue = eatExpression()
        eatToken(TokenKind.COLON);
        SpelNodeImpl ifFalseExprValue = eatExpression()
        return new Ternary(toPos(t),expr,ifTrueExprValue,ifFalseExprValue);
      }
    }
    return expr;
  }
View Full Code Here


      } else if (t.kind==TokenKind.QMARK) { // a?b:c
        nextToken();
        SpelNodeImpl ifTrueExprValue = eatExpression()
        eatToken(TokenKind.COLON);
        SpelNodeImpl ifFalseExprValue = eatExpression()
        return new Ternary(toPos(t),expr,ifTrueExprValue,ifFalseExprValue);
      }
    }
    return expr;
  }
View Full Code Here

   
    Expression expression = parser.parseExpression("DR[0].three.four lt 0.1d?#root:null");
    v = expression.getValue(payload);
   
    SpelExpression sExpr = (SpelExpression)expression;
    Ternary ternary = (Ternary)sExpr.getAST();
    OpLT oplt = (OpLT)ternary.getChild(0);
    CompoundExpression cExpr = (CompoundExpression)oplt.getLeftOperand();
    String cExprExitDescriptor = cExpr.getExitDescriptor();
    assertEquals("D",cExprExitDescriptor);
    assertEquals("Z",oplt.getExitDescriptor());
   
View Full Code Here

        }
        nextToken();
        SpelNodeImpl ifTrueExprValue = eatExpression()
        eatToken(TokenKind.COLON);
        SpelNodeImpl ifFalseExprValue = eatExpression()
        return new Ternary(toPos(t),expr,ifTrueExprValue,ifFalseExprValue);
      }
    }
    return expr;
  }
View Full Code Here

        }
        nextToken();
        SpelNodeImpl ifTrueExprValue = eatExpression();
        eatToken(TokenKind.COLON);
        SpelNodeImpl ifFalseExprValue = eatExpression();
        return new Ternary(toPos(t), expr, ifTrueExprValue, ifFalseExprValue);
      }
    }
    return expr;
  }
View Full Code Here

TOP

Related Classes of org.springframework.expression.spel.ast.Ternary

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.