org.springframework.expression
Interface ExpressionParser

All Known Implementing Classes:
InternalSpelExpressionParser, SpelExpressionParser, TemplateAwareExpressionParser

public interface ExpressionParser

Parses expression strings into compiled expressions that can be evaluated. Supports parsing templates as well as standard expression strings.

Since:
3.0
Author:
Keith Donald, Andy Clement

Method Summary
 Expression parseExpression(java.lang.String expressionString)
          Parse the expression string and return an Expression object you can use for repeated evaluation.
 Expression parseExpression(java.lang.String expressionString, ParserContext context)
          Parse the expression string and return an Expression object you can use for repeated evaluation.
 

Method Detail

parseExpression

Expression parseExpression(java.lang.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
 

Parameters:
expressionString - the raw expression string to parse
Returns:
an evaluator for the parsed expression
Throws:
ParseException - an exception occurred during parsing

parseExpression

Expression parseExpression(java.lang.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
 

Parameters:
expressionString - the raw expression string to parse
context - a context for influencing this expression parsing routine (optional)
Returns:
an evaluator for the parsed expression
Throws:
ParseException - an exception occurred during parsing