接口 ExpressionParser
public interface ExpressionParser
Parses expression strings into compiled expressions that can be evaluated. Supports parsing templates as well as standard expression strings.- 从以下版本开始:
- 3.0
- 作者:
- Keith Donald, Andy Clement
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 Expression
parseExpression(String expressionString)
Parse the expression string and return an Expression object you can use for repeated evaluation.Expression
parseExpression(String expressionString, ParserContext context)
Parse the expression string and return an Expression object you can use for repeated evaluation.
方法详细资料
parseExpression
Expression parseExpression(String expressionString) throws ParseException
Parse the expression string and return an Expression object you can use for repeated evaluation.Some examples:
3 + 4 name.firstName
- 参数:
expressionString
- the raw expression string to parse- 返回:
- an evaluator for the parsed expression
- 抛出:
ParseException
- an exception occurred during parsing
parseExpression
Expression parseExpression(String expressionString, ParserContext context) throws ParseException
Parse the expression string and return an Expression object you can use for repeated evaluation.Some examples:
3 + 4 name.firstName
- 参数:
expressionString
- the raw expression string to parsecontext
- a context for influencing this expression parsing routine (optional)- 返回:
- an evaluator for the parsed expression
- 抛出:
ParseException
- an exception occurred during parsing