A handle on the place an assignable expression names (a property, a variable, a list or map element), to read and write it.
SpelNode.getValueRef returns one, so that x++ and x = ... find
the target once and then read and write it. Applications never use
it; it matters only to custom SpelNodes.
// What `x++` does with its target.
final ref = node.getValueRef(state);
if (ref.isWritable) {
ref.setValue((ref.getValue()! as int) + 1);
}
Spring (Java):
ValueRef ref = node.getValueRef(state);
if (ref.isWritable()) {
ref.setValue(newValue);
}
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isWritable → bool
-
Whether setValue is supported.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getValue(
) → Object? - The value stored at this place now.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setValue(
Object? value) → void -
Stores
valueat this place; throws aSpelEvaluationExceptionwhen it cannot. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited