public class SpringELExpression extends java.lang.Object implements Expression
A wrapper for a Spring EL Expression allowing it to be used under the Spring
Binding Expression abstraction.
| Constructor and Description |
|---|
SpringELExpression(org.springframework.expression.Expression expression,
java.util.Map expressionVariables,
java.lang.Class expectedType,
org.springframework.core.convert.ConversionService conversionService,
java.util.List<org.springframework.expression.PropertyAccessor> propertyAccessors)
Constructor for SpringELExpression.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getExpressionString()
Returns the original string used to create this expression, unmodified.
|
java.lang.Object |
getValue(java.lang.Object rootObject)
Evaluate this expression in the provided context and return the result of evaluation.
|
java.lang.Class |
getValueType(java.lang.Object rootObject)
Returns the most general type that can be passed to the
Expression.setValue(Object, Object) method for the given
context. |
void |
setValue(java.lang.Object rootObject,
java.lang.Object value)
Set this expression in the provided context to the value provided.
|
java.lang.String |
toString() |
public SpringELExpression(org.springframework.expression.Expression expression,
java.util.Map expressionVariables,
java.lang.Class expectedType,
org.springframework.core.convert.ConversionService conversionService,
java.util.List<org.springframework.expression.PropertyAccessor> propertyAccessors)
expression - a parsed Spring EL expression instance. Must not be null.expressionVariables - provides a mapping between variables names and parsed Spring EL expression instances.
This parameter is optional (may be null).expectedType - the target type expected from the evaluation of the expression or null. This parameter is
optional (may be null).conversionService - the Spring ConversionService instance to use for type conversionpropertyAccessors - propertyAccessors for Spring EL to use when evaluating expressionspublic java.lang.String getExpressionString()
ExpressiongetExpressionString in interface Expressionpublic java.lang.Object getValue(java.lang.Object rootObject)
throws EvaluationException
ExpressiongetValue in interface ExpressionrootObject - the context to evaluate this expression inEvaluationException - an exception occurred during expression evaluationpublic java.lang.Class getValueType(java.lang.Object rootObject)
throws EvaluationException
ExpressionExpression.setValue(Object, Object) method for the given
context.getValueType in interface ExpressionrootObject - the context to evaluatenull if the type
information cannot be determinedEvaluationException - an exception occurred during expression evaluationpublic void setValue(java.lang.Object rootObject,
java.lang.Object value)
throws EvaluationException
ExpressionsetValue in interface ExpressionrootObject - the context on which the new value should be setvalue - the new value to setEvaluationException - an exception occurred during expression evaluationpublic java.lang.String toString()
toString in class java.lang.Object