|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.expression.spel.ast.SpelNodeImpl
public abstract class SpelNodeImpl
The common supertype of all AST nodes in a parsed Spring Expression Language format expression.
| Field Summary | |
|---|---|
protected SpelNodeImpl[] |
children
|
protected int |
pos
|
| Constructor Summary | |
|---|---|
SpelNodeImpl(int pos,
SpelNodeImpl... operands)
|
|
| Method Summary | ||
|---|---|---|
SpelNode |
getChild(int index)
Helper method that returns a SpelNode rather than an Antlr Tree node. |
|
int |
getChildCount()
|
|
int |
getEndPosition()
|
|
Class<?> |
getObjectClass(Object obj)
Determine the class of the object passed in, unless it is already a class object. |
|
protected SpelNodeImpl |
getPreviousChild()
|
|
int |
getStartPosition()
|
|
TypedValue |
getTypedValue(ExpressionState expressionState)
Evaluate the expression node in the context of the supplied expression state and return the typed value. |
|
Object |
getValue(ExpressionState expressionState)
Evaluate the expression node in the context of the supplied expression state and return the value. |
|
protected
|
getValue(ExpressionState state,
Class<T> desiredReturnType)
|
|
abstract TypedValue |
getValueInternal(ExpressionState expressionState)
|
|
boolean |
isWritable(ExpressionState expressionState)
Determine if this expression node will support a setValue() call. |
|
protected boolean |
nextChildIs(Class... clazzes)
|
|
void |
setValue(ExpressionState expressionState,
Object newValue)
Evaluate the expression to a node and then set the new value on that node. |
|
abstract String |
toStringAST()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int pos
protected SpelNodeImpl[] children
| Constructor Detail |
|---|
public SpelNodeImpl(int pos,
SpelNodeImpl... operands)
| Method Detail |
|---|
protected SpelNodeImpl getPreviousChild()
protected boolean nextChildIs(Class... clazzes)
public final Object getValue(ExpressionState expressionState)
throws EvaluationException
SpelNode
getValue in interface SpelNodeexpressionState - the current expression state (includes the context)
EvaluationException
public final TypedValue getTypedValue(ExpressionState expressionState)
throws EvaluationException
SpelNode
getTypedValue in interface SpelNodeexpressionState - the current expression state (includes the context)
EvaluationException
public boolean isWritable(ExpressionState expressionState)
throws EvaluationException
SpelNode
isWritable in interface SpelNodeexpressionState - the current expression state (includes the context)
EvaluationException - if something went wrong trying to determine if the node supports writing
public void setValue(ExpressionState expressionState,
Object newValue)
throws EvaluationException
SpelNode
setValue in interface SpelNodeexpressionState - the current expression state (includes the context)newValue - the new value
EvaluationException - if any problem occurs evaluating the expression or setting the new valuepublic SpelNode getChild(int index)
SpelNode
getChild in interface SpelNodepublic int getChildCount()
getChildCount in interface SpelNodepublic Class<?> getObjectClass(Object obj)
SpelNode
getObjectClass in interface SpelNode
protected final <T> T getValue(ExpressionState state,
Class<T> desiredReturnType)
throws EvaluationException
EvaluationException
public abstract TypedValue getValueInternal(ExpressionState expressionState)
throws EvaluationException
EvaluationExceptionpublic abstract String toStringAST()
toStringAST in interface SpelNodepublic int getStartPosition()
getStartPosition in interface SpelNodepublic int getEndPosition()
getEndPosition in interface SpelNode
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||