Class SpringELExpressionParser
java.lang.Object
org.springframework.binding.expression.spel.SpringELExpressionParser
- All Implemented Interfaces:
ExpressionParser
- Direct Known Subclasses:
WebFlowSpringELExpressionParser
Adapt the Spring EL
SpelExpressionParser to the Spring Binding
ExpressionParser contract.- Since:
- 2.1.0
- Author:
- Rossen Stoyanchev
-
Constructor Summary
ConstructorsConstructorDescriptionSpringELExpressionParser(org.springframework.expression.spel.standard.SpelExpressionParser expressionParser) SpringELExpressionParser(org.springframework.expression.spel.standard.SpelExpressionParser expressionParser, ConversionService conversionService) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPropertyAccessor(org.springframework.expression.PropertyAccessor propertyAccessor) protected SpringELExpressioncreateSpringELExpression(Map<String, Expression> expressionVars, org.springframework.expression.Expression spelExpression, Class<?> expectedResultType, org.springframework.core.convert.ConversionService conversionService) Create theSpringELExpression.parseExpression(String expression, ParserContext context) Parse the expression string and return a compiled Expression object you can use for evaluation.
-
Constructor Details
-
SpringELExpressionParser
public SpringELExpressionParser(org.springframework.expression.spel.standard.SpelExpressionParser expressionParser) -
SpringELExpressionParser
public SpringELExpressionParser(org.springframework.expression.spel.standard.SpelExpressionParser expressionParser, ConversionService conversionService)
-
-
Method Details
-
getConversionService
-
addPropertyAccessor
public void addPropertyAccessor(org.springframework.expression.PropertyAccessor propertyAccessor) -
parseExpression
Description copied from interface:ExpressionParserParse the expression string and return a compiled Expression object you can use for evaluation. Some examples:3 + 4 name.firstName- Specified by:
parseExpressionin interfaceExpressionParser- Parameters:
expression- the raw expression string to parsecontext- a context for influencing this expression parsing routine (optional)- Returns:
- an evaluator for the parsed expression
- Throws:
ParserException- an exception occurred during parsing
-
createSpringELExpression
protected SpringELExpression createSpringELExpression(Map<String, Expression> expressionVars, org.springframework.expression.Expression spelExpression, Class<?> expectedResultType, org.springframework.core.convert.ConversionService conversionService) Create theSpringELExpression.Note: as of 2.4.8, this method is not invoked when a
SimpleParserContextis passed in, which is mainly the case when using SpEL for data binding. In those scenarios, the configuration options are limited to the use of property accessors and a ConversionService.
-