Class SpelExpressionParser
- java.lang.Object
- org.springframework.expression.common.TemplateAwareExpressionParser
- org.springframework.expression.spel.standard.SpelExpressionParser
- All Implemented Interfaces:
ExpressionParser
public class SpelExpressionParser extends TemplateAwareExpressionParser
SpEL parser. Instances are reusable and thread-safe.- Since:
- 3.0
- Author:
- Andy Clement, Juergen Hoeller
Constructor Summary
Constructors Constructor Description SpelExpressionParser()
Create a parser with default settings.SpelExpressionParser(SpelParserConfiguration configuration)
Create a parser with the specified configuration.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SpelExpression
doParseExpression(String expressionString, ParserContext context)
Actually parse the expression string and return an Expression object.SpelExpression
parseRaw(String expressionString)
Methods inherited from class org.springframework.expression.common.TemplateAwareExpressionParser
parseExpression, parseExpression
Constructor Detail
SpelExpressionParser
public SpelExpressionParser()
Create a parser with default settings.
SpelExpressionParser
public SpelExpressionParser(SpelParserConfiguration configuration)
Create a parser with the specified configuration.- Parameters:
configuration
- custom configuration options
Method Detail
parseRaw
public SpelExpression parseRaw(String expressionString) throws ParseException
- Throws:
ParseException
doParseExpression
protected SpelExpression doParseExpression(String expressionString, @Nullable ParserContext context) throws ParseException
Description copied from class:TemplateAwareExpressionParser
Actually parse the expression string and return an Expression object.- Specified by:
doParseExpression
in classTemplateAwareExpressionParser
- Parameters:
expressionString
- the raw expression string to parsecontext
- a context for influencing this expression parsing routine (optional)- Returns:
- an evaluator for the parsed expression
- Throws:
ParseException
- an exception occurred during parsing