Interface ExpressionResolver
-
- All Known Implementing Classes:
DefaultExpressionResolver
public interface ExpressionResolverResolves SpEL expressions
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> TgetValue(java.lang.Object sourceObject, java.lang.String expression)Evaluates provided expression in regards to specified object.<T> TgetValue(java.lang.Object sourceObject, java.lang.String expression, java.util.Map<java.lang.String,java.lang.Object> variables)Evaluates provided expression in regards to specified object.<T> java.lang.Class<T>getValueType(java.lang.Object sourceObject, java.lang.String expression)Evaluates value type provided expression in regards to specified object.<T> java.lang.Class<T>getValueType(java.lang.Object sourceObject, java.lang.String expression, java.util.Map<java.lang.String,java.lang.Object> variables)Evaluates value type provided expression in regards to specified object.voidsetValue(java.lang.Object sourceObject, java.lang.String expression, java.lang.Object value)Sets the value for the specified expression.voidsetValue(java.lang.Object sourceObject, java.lang.String expression, java.lang.Object value, java.util.Locale locale)Sets the value for the specified expression and locale.
-
-
-
Method Detail
-
getValue
<T> T getValue(java.lang.Object sourceObject, java.lang.String expression) throws org.springframework.expression.ExpressionExceptionEvaluates provided expression in regards to specified object. CurrentLocaleis used during evaluation.- Returns:
- value of evaluation
- Throws:
org.springframework.expression.ExpressionException
-
getValue
<T> T getValue(java.lang.Object sourceObject, java.lang.String expression, java.util.Map<java.lang.String,java.lang.Object> variables) throws org.springframework.expression.ExpressionExceptionEvaluates provided expression in regards to specified object. The returning map holds a locale as key and the value of this map holds the corresponding localized value of the expression.- Parameters:
sourceObject- object on which evaluation is performedexpression- given expressionvariables- variables passed toEvaluationContext.setVariable(String, Object)- Returns:
- value of evaluation
- Throws:
org.springframework.expression.ExpressionException
-
getValueType
<T> java.lang.Class<T> getValueType(java.lang.Object sourceObject, java.lang.String expression, java.util.Map<java.lang.String,java.lang.Object> variables) throws org.springframework.expression.ExpressionExceptionEvaluates value type provided expression in regards to specified object.- Parameters:
sourceObject- object on which evaluation is performedexpression- given expressionvariables- variables passed toEvaluationContext.setVariable(String, Object)- Returns:
- value type of evaluation
- Throws:
org.springframework.expression.ExpressionException
-
getValueType
<T> java.lang.Class<T> getValueType(java.lang.Object sourceObject, java.lang.String expression) throws org.springframework.expression.ExpressionExceptionEvaluates value type provided expression in regards to specified object.- Parameters:
sourceObject- object on which evaluation is performedexpression- given expression- Returns:
- value type of evaluation
- Throws:
org.springframework.expression.ExpressionException
-
setValue
void setValue(java.lang.Object sourceObject, java.lang.String expression, java.lang.Object value)Sets the value for the specified expression.
-
setValue
void setValue(java.lang.Object sourceObject, java.lang.String expression, java.lang.Object value, java.util.Locale locale)Sets the value for the specified expression and locale. Assumes the the object has a setter with aLocaleas second argument for the given property.
-
-