Class SpelExpressionParser
java.lang.Object
org.springframework.expression.common.TemplateAwareExpressionParser
org.springframework.expression.spel.standard.SpelExpressionParser
- All Implemented Interfaces:
ExpressionParser
SpEL parser. Instances are reusable and thread-safe.
- Since:
- 3.0
- Author:
- Andy Clement, Juergen Hoeller, Sam Brannen
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a parser with default settings.SpelExpressionParser(SpelParserConfiguration configuration) Create a parser with the specified configuration. -
Method Summary
Modifier and TypeMethodDescriptionprotected SpelExpressiondoParseExpression(String expressionString, @Nullable ParserContext context) Actually parse the expression string and return an Expression object.Methods inherited from class TemplateAwareExpressionParser
parseExpression, parseExpression
-
Constructor Details
-
SpelExpressionParser
public SpelExpressionParser()Create a parser with default settings. -
SpelExpressionParser
Create a parser with the specified configuration.- Parameters:
configuration- custom configuration options
-
-
Method Details
-
parseRaw
- Throws:
ParseException
-
doParseExpression
protected SpelExpression doParseExpression(String expressionString, @Nullable ParserContext context) throws ParseException Description copied from class:TemplateAwareExpressionParserActually parse the expression string and return an Expression object.- Specified by:
doParseExpressionin 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- if an exception occurred during parsing
-