public class Indexer extends SpelNodeImpl
Modifier and Type | Class and Description |
---|---|
private class |
Indexer.ArrayIndexingValueRef |
private class |
Indexer.CollectionIndexingValueRef |
private static class |
Indexer.MapIndexingValueRef |
private class |
Indexer.PropertyIndexingValueRef |
private class |
Indexer.StringIndexingLValue |
Modifier and Type | Field and Description |
---|---|
private PropertyAccessor |
cachedReadAccessor |
private java.lang.String |
cachedReadName |
private java.lang.Class<?> |
cachedReadTargetType |
private PropertyAccessor |
cachedWriteAccessor |
private java.lang.String |
cachedWriteName |
private java.lang.Class<?> |
cachedWriteTargetType |
children, pos
Constructor and Description |
---|
Indexer(int pos,
SpelNodeImpl expr) |
Modifier and Type | Method and Description |
---|---|
private java.lang.Object |
accessArrayElement(java.lang.Object ctx,
int idx) |
private void |
checkAccess(int arrayLength,
int index) |
TypedValue |
getValueInternal(ExpressionState state) |
protected ValueRef |
getValueRef(ExpressionState state) |
boolean |
isWritable(ExpressionState expressionState)
Determine if this expression node will support a setValue() call.
|
private void |
setArrayElement(TypeConverter converter,
java.lang.Object ctx,
int idx,
java.lang.Object newValue,
java.lang.Class<?> arrayComponentType) |
void |
setValue(ExpressionState state,
java.lang.Object newValue)
Evaluate the expression to a node and then set the new value on that node.
|
java.lang.String |
toStringAST() |
getChild, getChildCount, getEndPosition, getObjectClass, getPreviousChild, getStartPosition, getTypedValue, getValue, getValue, nextChildIs
private java.lang.String cachedReadName
private java.lang.Class<?> cachedReadTargetType
private PropertyAccessor cachedReadAccessor
private java.lang.String cachedWriteName
private java.lang.Class<?> cachedWriteTargetType
private PropertyAccessor cachedWriteAccessor
public Indexer(int pos, SpelNodeImpl expr)
public TypedValue getValueInternal(ExpressionState state) throws EvaluationException
getValueInternal
in class SpelNodeImpl
EvaluationException
public void setValue(ExpressionState state, java.lang.Object newValue) throws EvaluationException
SpelNode
setValue
in interface SpelNode
setValue
in class SpelNodeImpl
state
- the current expression state (includes the context)newValue
- the new valueEvaluationException
- if any problem occurs evaluating the expression or
setting the new valuepublic boolean isWritable(ExpressionState expressionState) throws SpelEvaluationException
SpelNode
isWritable
in interface SpelNode
isWritable
in class SpelNodeImpl
expressionState
- the current expression state (includes the context)SpelEvaluationException
protected ValueRef getValueRef(ExpressionState state) throws EvaluationException
getValueRef
in class SpelNodeImpl
EvaluationException
public java.lang.String toStringAST()
private void setArrayElement(TypeConverter converter, java.lang.Object ctx, int idx, java.lang.Object newValue, java.lang.Class<?> arrayComponentType) throws EvaluationException
EvaluationException
private java.lang.Object accessArrayElement(java.lang.Object ctx, int idx) throws SpelEvaluationException
SpelEvaluationException
private void checkAccess(int arrayLength, int index) throws SpelEvaluationException
SpelEvaluationException