@Component public class SpelExpressionHelper extends Object
| Constructor and Description |
|---|
SpelExpressionHelper() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
evaluate(org.springframework.expression.Expression expression,
Class<T> desiredResultType,
Map<String,Object> variables)
Evaluates the given expression using the given variables as context variables.
|
<T> T |
evaluate(org.springframework.expression.Expression expression,
Map<String,Object> variables)
Evaluates the given expression using the given variables as context variables.
|
<T> T |
evaluate(String expressionString,
Class<T> desiredResultType,
Map<String,Object> variables)
Evaluates the given expression string using the given variables as context variables.
|
<T> T |
evaluate(String expressionString,
Map<String,Object> variables)
Evaluates the given expression string using the given variables as context variables.
|
org.springframework.expression.Expression |
parseExpression(String expressionString)
Parses the given expression string into a SpEL expression.
|
public <T> T evaluate(String expressionString, Class<T> desiredResultType, Map<String,Object> variables)
T - The desired typeexpressionString - Expression string to evaluatedesiredResultType - The desired type of the result. Spring will make best attempt at converting result to this type.variables - The variables to put into contextpublic <T> T evaluate(String expressionString, Map<String,Object> variables)
T - The desired typeexpressionString - Expression string to evaluatevariables - The variables to put into contextpublic org.springframework.expression.Expression parseExpression(String expressionString)
expressionString - The expression stringpublic <T> T evaluate(org.springframework.expression.Expression expression,
Class<T> desiredResultType,
Map<String,Object> variables)
T - The desired typeexpression - The expression to evaluatedesiredResultType - The desired type of the result. Spring will make best attempt at converting result to this type.variables - The variables to put into contextpublic <T> T evaluate(org.springframework.expression.Expression expression,
Map<String,Object> variables)
T - The desired typeexpression - The expression to evaluatevariables - The variables to put into contextCopyright © 2019. All rights reserved.