Skip to content

Commit 1551189

Browse files
committed
Revise Javadoc for IndexAccessor
See gh-26409 See gh-26478
1 parent 22bfe7d commit 1551189

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

Diff for: spring-expression/src/main/java/org/springframework/expression/IndexAccessor.java

+15-13
Original file line numberDiff line numberDiff line change
@@ -58,49 +58,51 @@ public interface IndexAccessor extends TargetedAccessor {
5858
Class<?>[] getSpecificTargetClasses();
5959

6060
/**
61-
* Called to determine if this index accessor is able to read a specified
62-
* index on a specified target object.
61+
* Determine if this index accessor is able to read a specified index on a
62+
* specified target object.
6363
* @param context the evaluation context in which the access is being attempted
6464
* @param target the target object upon which the index is being accessed
6565
* @param index the index being accessed
66-
* @return true if this index accessor is able to read the index
66+
* @return {@code true} if this index accessor is able to read the index
6767
* @throws AccessException if there is any problem determining whether the
6868
* index can be read
6969
*/
7070
boolean canRead(EvaluationContext context, Object target, Object index) throws AccessException;
7171

7272
/**
73-
* Called to read an index from a specified target object.
74-
* <p>Should only succeed if {@link #canRead} also returns {@code true}.
73+
* Read an index from a specified target object.
74+
* <p>Should only be invoked if {@link #canRead} returns {@code true} for the
75+
* same arguments.
7576
* @param context the evaluation context in which the access is being attempted
7677
* @param target the target object upon which the index is being accessed
7778
* @param index the index being accessed
7879
* @return a TypedValue object wrapping the index value read and a type
79-
* descriptor for it
80-
* @throws AccessException if there is any problem reading the index value
80+
* descriptor for the value
81+
* @throws AccessException if there is any problem reading the index
8182
*/
8283
TypedValue read(EvaluationContext context, Object target, Object index) throws AccessException;
8384

8485
/**
85-
* Called to determine if this index accessor is able to write to a specified
86-
* index on a specified target object.
86+
* Determine if this index accessor is able to write to a specified index on
87+
* a specified target object.
8788
* @param context the evaluation context in which the access is being attempted
8889
* @param target the target object upon which the index is being accessed
8990
* @param index the index being accessed
90-
* @return true if this index accessor is able to write to the index
91+
* @return {@code true} if this index accessor is able to write to the index
9192
* @throws AccessException if there is any problem determining whether the
9293
* index can be written to
9394
*/
9495
boolean canWrite(EvaluationContext context, Object target, Object index) throws AccessException;
9596

9697
/**
97-
* Called to write to an index on a specified target object.
98-
* <p>Should only succeed if {@link #canWrite} also returns {@code true}.
98+
* Write to an index on a specified target object.
99+
* <p>Should only be invoked if {@link #canWrite} returns {@code true} for the
100+
* same arguments.
99101
* @param context the evaluation context in which the access is being attempted
100102
* @param target the target object upon which the index is being accessed
101103
* @param index the index being accessed
102104
* @param newValue the new value for the index
103-
* @throws AccessException if there is any problem writing to the index value
105+
* @throws AccessException if there is any problem writing to the index
104106
*/
105107
void write(EvaluationContext context, Object target, Object index, @Nullable Object newValue)
106108
throws AccessException;

0 commit comments

Comments
 (0)