diff --git a/spring-expression/src/main/java/org/springframework/expression/Expression.java b/spring-expression/src/main/java/org/springframework/expression/Expression.java index 97e89ab671e0..a34daa068e38 100644 --- a/spring-expression/src/main/java/org/springframework/expression/Expression.java +++ b/spring-expression/src/main/java/org/springframework/expression/Expression.java @@ -40,7 +40,7 @@ public interface Expression { String getExpressionString(); /** - * Evaluate this expression in the default standard context. + * Evaluate this expression in the default context and return the result of evaluation. * @return the evaluation result * @throws EvaluationException if there is a problem during evaluation */ @@ -48,8 +48,8 @@ public interface Expression { Object getValue() throws EvaluationException; /** - * Evaluate this expression in the default context. If the result - * of the evaluation does not match (and cannot be converted to) + * Evaluate this expression in the default context and return the result of evaluation. + *
If the result of the evaluation does not match (and cannot be converted to)
* the expected result type then an exception will be thrown.
* @param desiredResultType the type the caller would like the result to be
* @return the evaluation result
@@ -59,7 +59,8 @@ public interface Expression {
If the result of the evaluation does not match (and cannot be converted to)
+ * the expected result type then an exception will be thrown.
* @param rootObject the root object against which to evaluate the expression
* @param desiredResultType the type the caller would like the result to be
* @return the evaluation result
@@ -81,8 +83,7 @@ The supplied root object will be used as an override for any default root object
+ * configured in the context.
* @param context the context in which to evaluate the expression
* @param rootObject the root object against which to evaluate the expression
* @return the evaluation result
@@ -103,10 +105,9 @@ If the result of the evaluation does not match (and cannot be converted to)
+ * the expected result type then an exception will be thrown.
* @param context the context in which to evaluate the expression
* @param desiredResultType the type the caller would like the result to be
* @return the evaluation result
@@ -117,11 +118,12 @@ The supplied root object overrides any specified in the supplied context.
+ * Evaluate this expression in the provided context against the specified root object
+ * and return the result of evaluation.
+ * The supplied root object will be used as an override for any default root object
+ * configured in the context.
+ * If the result of the evaluation does not match (and cannot be converted to)
+ * the expected result type then an exception will be thrown.
* @param context the context in which to evaluate the expression
* @param rootObject the root object against which to evaluate the expression
* @param desiredResultType the type the caller would like the result to be
@@ -163,9 +165,9 @@ The supplied root object overrides any specified in the supplied context.
+ * {@link #setValue(EvaluationContext, Object, Object)} method for the given context.
+ * The supplied root object will be used as an override for any default root object
+ * configured in the context.
* @param context the context in which to evaluate the expression
* @param rootObject the root object against which to evaluate the expression
* @return the most general type of value that can be set in this context
@@ -207,7 +209,8 @@ The supplied root object overrides any specified in the supplied context.
+ * The supplied root object will be used as an override for any default root object
+ * configured in the context.
* @param context the context in which to evaluate the expression
* @param rootObject the root object against which to evaluate the expression
* @return a type descriptor for values that can be set in this context
@@ -235,7 +238,8 @@ TypeDescriptor getValueTypeDescriptor(EvaluationContext context, @Nullable Objec
/**
* Determine if this expression can be written to, i.e. setValue() can be called.
- * The supplied root object overrides any specified in the supplied context.
+ * The supplied root object will be used as an override for any default root object
+ * configured in the context.
* @param context the context in which the expression should be checked
* @param rootObject the root object against which to evaluate the expression
* @return {@code true} if the expression is writable; {@code false} otherwise
@@ -244,7 +248,7 @@ TypeDescriptor getValueTypeDescriptor(EvaluationContext context, @Nullable Objec
boolean isWritable(EvaluationContext context, @Nullable Object rootObject) throws EvaluationException;
/**
- * Set this expression in the provided context to the value provided.
+ * Set this expression in the default context to the value provided.
* @param rootObject the root object against which to evaluate the expression
* @param value the new value
* @throws EvaluationException if there is a problem during evaluation
@@ -261,7 +265,8 @@ TypeDescriptor getValueTypeDescriptor(EvaluationContext context, @Nullable Objec
/**
* Set this expression in the provided context to the value provided.
- * The supplied root object overrides any specified in the supplied context.
+ * The supplied root object will be used as an override for any default root object
+ * configured in the context.
* @param context the context in which to set the value of the expression
* @param rootObject the root object against which to evaluate the expression
* @param value the new value