public interface SpelNode
Modifier and Type | Method and Description |
---|---|
SpelNode |
getChild(int index)
Helper method that returns a SpelNode rather than an Antlr Tree node.
|
int |
getChildCount()
Return the number of children under this node.
|
int |
getEndPosition()
Return the end position of this AST node in the expression string.
|
java.lang.Class<?> |
getObjectClass(java.lang.Object obj)
Determine the class of the object passed in, unless it is already a class object.
|
int |
getStartPosition()
Return the start position of this AST node in the expression string.
|
TypedValue |
getTypedValue(ExpressionState expressionState)
Evaluate the expression node in the context of the supplied expression state
and return the typed value.
|
java.lang.Object |
getValue(ExpressionState expressionState)
Evaluate the expression node in the context of the supplied expression state
and return the value.
|
boolean |
isWritable(ExpressionState expressionState)
Determine if this expression node will support a setValue() call.
|
void |
setValue(ExpressionState expressionState,
java.lang.Object newValue)
Evaluate the expression to a node and then set the new value on that node.
|
java.lang.String |
toStringAST()
Return the string form the this AST node.
|
@Nullable java.lang.Object getValue(ExpressionState expressionState) throws EvaluationException
expressionState
- the current expression state (includes the context)EvaluationException
TypedValue getTypedValue(ExpressionState expressionState) throws EvaluationException
expressionState
- the current expression state (includes the context)EvaluationException
boolean isWritable(ExpressionState expressionState) throws EvaluationException
expressionState
- the current expression state (includes the context)EvaluationException
- if something went wrong trying to determine
if the node supports writingvoid setValue(ExpressionState expressionState, @Nullable java.lang.Object newValue) throws EvaluationException
expressionState
- the current expression state (includes the context)newValue
- the new valueEvaluationException
- if any problem occurs evaluating the expression or
setting the new valuejava.lang.String toStringAST()
int getChildCount()
SpelNode getChild(int index)
@Nullable java.lang.Class<?> getObjectClass(@Nullable java.lang.Object obj)
obj
- the object that the caller wants the class ofnull
if the object is null
int getStartPosition()
int getEndPosition()