本文整理汇总了Java中org.springframework.expression.spel.standard.SpelExpression.getAST方法的典型用法代码示例。如果您正苦于以下问题:Java SpelExpression.getAST方法的具体用法?Java SpelExpression.getAST怎么用?Java SpelExpression.getAST使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.expression.spel.standard.SpelExpression
的用法示例。
在下文中一共展示了SpelExpression.getAST方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkConstantList
import org.springframework.expression.spel.standard.SpelExpression; //导入方法依赖的package包/类
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());
}
}
示例2: checkConstantMap
import org.springframework.expression.spel.standard.SpelExpression; //导入方法依赖的package包/类
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());
}
}
示例3: validate
import org.springframework.expression.spel.standard.SpelExpression; //导入方法依赖的package包/类
public void validate(String expression, Class<?> expressionRoot) throws ExpressionValidationException, ParseException {
SpelExpression exp = (SpelExpression) parser.parseExpression(expression);
if (expressionRoot != null) {
SpelNode node = exp.getAST();
handle(node, expressionRoot);
}
}
示例4: checkConstantList
import org.springframework.expression.spel.standard.SpelExpression; //导入方法依赖的package包/类
private void checkConstantList(String expressionText, boolean expectedToBeConstant) {
SpelExpressionParser parser = new SpelExpressionParser();
SpelExpression expression = (SpelExpression) parser.parseExpression(expressionText);
SpelNode node = expression.getAST();
Assert.assertTrue(node instanceof InlineList);
InlineList inlineList = (InlineList) node;
if (expectedToBeConstant) {
Assert.assertTrue(inlineList.isConstant());
} else {
Assert.assertFalse(inlineList.isConstant());
}
}
示例5: getOperatorNode
import org.springframework.expression.spel.standard.SpelExpression; //导入方法依赖的package包/类
private Operator getOperatorNode(SpelExpression expr) {
SpelNode node = expr.getAST();
return findOperator(node);
}
示例6: getAst
import org.springframework.expression.spel.standard.SpelExpression; //导入方法依赖的package包/类
private SpelNodeImpl getAst() {
SpelExpression spelExpression = (SpelExpression)expression;
SpelNode ast = spelExpression.getAST();
return (SpelNodeImpl)ast;
}
示例7: getOperatorNode
import org.springframework.expression.spel.standard.SpelExpression; //导入方法依赖的package包/类
private Operator getOperatorNode(SpelExpression e) {
SpelNode node = e.getAST();
return (Operator)findNode(node,Operator.class);
}