Java Code Examples for org.springframework.expression.spel.standard.SpelExpression#getAST()
The following examples show how to use
org.springframework.expression.spel.standard.SpelExpression#getAST() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ListTests.java From spring-analysis-note with MIT License | 5 votes |
private void checkConstantList(String expressionText, boolean expectedToBeConstant) { SpelExpressionParser parser = new SpelExpressionParser(); SpelExpression expression = (SpelExpression) parser.parseExpression(expressionText); SpelNode node = expression.getAST(); assertTrue(node instanceof InlineList); InlineList inlineList = (InlineList) node; if (expectedToBeConstant) { assertTrue(inlineList.isConstant()); } else { assertFalse(inlineList.isConstant()); } }
Example 2
Source File: MapTests.java From spring-analysis-note with MIT License | 5 votes |
private void checkConstantMap(String expressionText, boolean expectedToBeConstant) { SpelExpressionParser parser = new SpelExpressionParser(); SpelExpression expression = (SpelExpression) parser.parseExpression(expressionText); SpelNode node = expression.getAST(); assertTrue(node instanceof InlineMap); InlineMap inlineMap = (InlineMap) node; if (expectedToBeConstant) { assertTrue(inlineMap.isConstant()); } else { assertFalse(inlineMap.isConstant()); } }
Example 3
Source File: ListTests.java From java-technology-stack with MIT License | 5 votes |
private void checkConstantList(String expressionText, boolean expectedToBeConstant) { SpelExpressionParser parser = new SpelExpressionParser(); SpelExpression expression = (SpelExpression) parser.parseExpression(expressionText); SpelNode node = expression.getAST(); assertTrue(node instanceof InlineList); InlineList inlineList = (InlineList) node; if (expectedToBeConstant) { assertTrue(inlineList.isConstant()); } else { assertFalse(inlineList.isConstant()); } }
Example 4
Source File: MapTests.java From java-technology-stack with MIT License | 5 votes |
private void checkConstantMap(String expressionText, boolean expectedToBeConstant) { SpelExpressionParser parser = new SpelExpressionParser(); SpelExpression expression = (SpelExpression) parser.parseExpression(expressionText); SpelNode node = expression.getAST(); assertTrue(node instanceof InlineMap); InlineMap inlineMap = (InlineMap) node; if (expectedToBeConstant) { assertTrue(inlineMap.isConstant()); } else { assertFalse(inlineMap.isConstant()); } }
Example 5
Source File: ListTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
private void checkConstantList(String expressionText, boolean expectedToBeConstant) { SpelExpressionParser parser = new SpelExpressionParser(); SpelExpression expression = (SpelExpression) parser.parseExpression(expressionText); SpelNode node = expression.getAST(); assertTrue(node instanceof InlineList); InlineList inlineList = (InlineList) node; if (expectedToBeConstant) { assertTrue(inlineList.isConstant()); } else { assertFalse(inlineList.isConstant()); } }
Example 6
Source File: MapTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
private void checkConstantMap(String expressionText, boolean expectedToBeConstant) { SpelExpressionParser parser = new SpelExpressionParser(); SpelExpression expression = (SpelExpression) parser.parseExpression(expressionText); SpelNode node = expression.getAST(); assertTrue(node instanceof InlineMap); InlineMap inlineMap = (InlineMap) node; if (expectedToBeConstant) { assertTrue(inlineMap.isConstant()); } else { assertFalse(inlineMap.isConstant()); } }
Example 7
Source File: OperatorTests.java From spring-analysis-note with MIT License | 4 votes |
private Operator getOperatorNode(SpelExpression expr) { SpelNode node = expr.getAST(); return findOperator(node); }
Example 8
Source File: OperatorTests.java From java-technology-stack with MIT License | 4 votes |
private Operator getOperatorNode(SpelExpression expr) { SpelNode node = expr.getAST(); return findOperator(node); }
Example 9
Source File: OperatorTests.java From spring4-understanding with Apache License 2.0 | 4 votes |
private Operator getOperatorNode(SpelExpression expr) { SpelNode node = expr.getAST(); return findOperator(node); }
Example 10
Source File: SpelCompilationCoverageTests.java From spring4-understanding with Apache License 2.0 | 4 votes |
private SpelNodeImpl getAst() { SpelExpression spelExpression = (SpelExpression)expression; SpelNode ast = spelExpression.getAST(); return (SpelNodeImpl)ast; }