@@ -40,16 +40,16 @@ public interface Expression {
40
40
String getExpressionString ();
41
41
42
42
/**
43
- * Evaluate this expression in the default standard context.
43
+ * Evaluate this expression in the default context and return the result of evaluation .
44
44
* @return the evaluation result
45
45
* @throws EvaluationException if there is a problem during evaluation
46
46
*/
47
47
@ Nullable
48
48
Object getValue () throws EvaluationException ;
49
49
50
50
/**
51
- * Evaluate this expression in the default context. If the result
52
- * of the evaluation does not match (and cannot be converted to)
51
+ * Evaluate this expression in the default context and return the result of evaluation.
52
+ * <p>If the result of the evaluation does not match (and cannot be converted to)
53
53
* the expected result type then an exception will be thrown.
54
54
* @param desiredResultType the type the caller would like the result to be
55
55
* @return the evaluation result
@@ -59,7 +59,8 @@ public interface Expression {
59
59
<T > T getValue (@ Nullable Class <T > desiredResultType ) throws EvaluationException ;
60
60
61
61
/**
62
- * Evaluate this expression against the specified root object.
62
+ * Evaluate this expression in the default context against the specified root object
63
+ * and return the result of evaluation.
63
64
* @param rootObject the root object against which to evaluate the expression
64
65
* @return the evaluation result
65
66
* @throws EvaluationException if there is a problem during evaluation
@@ -68,9 +69,10 @@ public interface Expression {
68
69
Object getValue (@ Nullable Object rootObject ) throws EvaluationException ;
69
70
70
71
/**
71
- * Evaluate this expression in the default context against the specified root
72
- * object. If the result of the evaluation does not match (and cannot be
73
- * converted to) the expected result type then an exception will be thrown.
72
+ * Evaluate this expression in the default context against the specified root object
73
+ * and return the result of evaluation.
74
+ * <p>If the result of the evaluation does not match (and cannot be converted to)
75
+ * the expected result type then an exception will be thrown.
74
76
* @param rootObject the root object against which to evaluate the expression
75
77
* @param desiredResultType the type the caller would like the result to be
76
78
* @return the evaluation result
@@ -81,8 +83,7 @@ <T> T getValue(@Nullable Object rootObject, @Nullable Class<T> desiredResultType
81
83
throws EvaluationException ;
82
84
83
85
/**
84
- * Evaluate this expression in the provided context and return the result
85
- * of evaluation.
86
+ * Evaluate this expression in the provided context and return the result of evaluation.
86
87
* @param context the context in which to evaluate the expression
87
88
* @return the evaluation result
88
89
* @throws EvaluationException if there is a problem during evaluation
@@ -91,9 +92,10 @@ <T> T getValue(@Nullable Object rootObject, @Nullable Class<T> desiredResultType
91
92
Object getValue (EvaluationContext context ) throws EvaluationException ;
92
93
93
94
/**
94
- * Evaluate this expression in the provided context and return the result
95
- * of evaluation, but use the supplied root context as an override for any
96
- * default root object specified in the context.
95
+ * Evaluate this expression in the provided context against the specified root object
96
+ * and return the result of evaluation.
97
+ * <p>The supplied root object will be used as an override for any default root object
98
+ * configured in the context.
97
99
* @param context the context in which to evaluate the expression
98
100
* @param rootObject the root object against which to evaluate the expression
99
101
* @return the evaluation result
@@ -103,10 +105,9 @@ <T> T getValue(@Nullable Object rootObject, @Nullable Class<T> desiredResultType
103
105
Object getValue (EvaluationContext context , @ Nullable Object rootObject ) throws EvaluationException ;
104
106
105
107
/**
106
- * Evaluate this expression in the provided context which can resolve references
107
- * to properties, methods, types, etc. The type of the evaluation result is
108
- * expected to be of a particular type, and an exception will be thrown if it
109
- * is not and cannot be converted to that type.
108
+ * Evaluate this expression in the provided context and return the result of evaluation.
109
+ * <p>If the result of the evaluation does not match (and cannot be converted to)
110
+ * the expected result type then an exception will be thrown.
110
111
* @param context the context in which to evaluate the expression
111
112
* @param desiredResultType the type the caller would like the result to be
112
113
* @return the evaluation result
@@ -117,11 +118,12 @@ <T> T getValue(EvaluationContext context, @Nullable Class<T> desiredResultType)
117
118
throws EvaluationException ;
118
119
119
120
/**
120
- * Evaluate this expression in the provided context which can resolve references
121
- * to properties, methods, types, etc. The type of the evaluation result is
122
- * expected to be of a particular type, and an exception will be thrown if it
123
- * is not and cannot be converted to that type.j
124
- * <p>The supplied root object overrides any specified in the supplied context.
121
+ * Evaluate this expression in the provided context against the specified root object
122
+ * and return the result of evaluation.
123
+ * <p>The supplied root object will be used as an override for any default root object
124
+ * configured in the context.
125
+ * <p>If the result of the evaluation does not match (and cannot be converted to)
126
+ * the expected result type then an exception will be thrown.
125
127
* @param context the context in which to evaluate the expression
126
128
* @param rootObject the root object against which to evaluate the expression
127
129
* @param desiredResultType the type the caller would like the result to be
@@ -163,9 +165,9 @@ <T> T getValue(EvaluationContext context, @Nullable Object rootObject, @Nullable
163
165
164
166
/**
165
167
* Return the most general type that can be passed to the
166
- * {@link #setValue(EvaluationContext, Object, Object)} method for the given
167
- * context.
168
- * <p>The supplied root object overrides any specified in the supplied context.
168
+ * {@link #setValue(EvaluationContext, Object, Object)} method for the given context.
169
+ * <p>The supplied root object will be used as an override for any default root object
170
+ * configured in the context.
169
171
* @param context the context in which to evaluate the expression
170
172
* @param rootObject the root object against which to evaluate the expression
171
173
* @return the most general type of value that can be set in this context
@@ -207,7 +209,8 @@ <T> T getValue(EvaluationContext context, @Nullable Object rootObject, @Nullable
207
209
* Return a descriptor for the most general type that can be passed to the
208
210
* {@link #setValue(EvaluationContext, Object, Object)} method for the given
209
211
* context.
210
- * <p>The supplied root object overrides any specified in the supplied context.
212
+ * <p>The supplied root object will be used as an override for any default root object
213
+ * configured in the context.
211
214
* @param context the context in which to evaluate the expression
212
215
* @param rootObject the root object against which to evaluate the expression
213
216
* @return a type descriptor for values that can be set in this context
@@ -235,7 +238,8 @@ TypeDescriptor getValueTypeDescriptor(EvaluationContext context, @Nullable Objec
235
238
236
239
/**
237
240
* Determine if this expression can be written to, i.e. setValue() can be called.
238
- * <p>The supplied root object overrides any specified in the supplied context.
241
+ * <p>The supplied root object will be used as an override for any default root object
242
+ * configured in the context.
239
243
* @param context the context in which the expression should be checked
240
244
* @param rootObject the root object against which to evaluate the expression
241
245
* @return {@code true} if the expression is writable; {@code false} otherwise
@@ -244,7 +248,7 @@ TypeDescriptor getValueTypeDescriptor(EvaluationContext context, @Nullable Objec
244
248
boolean isWritable (EvaluationContext context , @ Nullable Object rootObject ) throws EvaluationException ;
245
249
246
250
/**
247
- * Set this expression in the provided context to the value provided.
251
+ * Set this expression in the default context to the value provided.
248
252
* @param rootObject the root object against which to evaluate the expression
249
253
* @param value the new value
250
254
* @throws EvaluationException if there is a problem during evaluation
@@ -261,7 +265,8 @@ TypeDescriptor getValueTypeDescriptor(EvaluationContext context, @Nullable Objec
261
265
262
266
/**
263
267
* Set this expression in the provided context to the value provided.
264
- * <p>The supplied root object overrides any specified in the supplied context.
268
+ * <p>The supplied root object will be used as an override for any default root object
269
+ * configured in the context.
265
270
* @param context the context in which to set the value of the expression
266
271
* @param rootObject the root object against which to evaluate the expression
267
272
* @param value the new value
0 commit comments