|
|||||||||
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
|
private static SpelNodeImpl[] |
NO_CHILDREN
|
private SpelNodeImpl |
parent
|
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()
|
|
java.lang.Class<?> |
getObjectClass(java.lang.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. |
|
java.lang.Object |
getValue(ExpressionState expressionState)
Evaluate the expression node in the context of the supplied expression state and return the value. |
|
protected
|
getValue(ExpressionState state,
java.lang.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(java.lang.Class... clazzes)
|
|
void |
setValue(ExpressionState expressionState,
java.lang.Object newValue)
Evaluate the expression to a node and then set the new value on that node. |
|
abstract java.lang.String |
toStringAST()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static SpelNodeImpl[] NO_CHILDREN
protected int pos
protected SpelNodeImpl[] children
private SpelNodeImpl parent
Constructor Detail |
---|
public SpelNodeImpl(int pos, SpelNodeImpl... operands)
Method Detail |
---|
protected SpelNodeImpl getPreviousChild()
protected boolean nextChildIs(java.lang.Class... clazzes)
public final java.lang.Object getValue(ExpressionState expressionState) throws EvaluationException
SpelNode
getValue
in interface SpelNode
expressionState
- the current expression state (includes the context)
EvaluationException
public final TypedValue getTypedValue(ExpressionState expressionState) throws EvaluationException
SpelNode
getTypedValue
in interface SpelNode
expressionState
- the current expression state (includes the context)
EvaluationException
public boolean isWritable(ExpressionState expressionState) throws EvaluationException
SpelNode
isWritable
in interface SpelNode
expressionState
- the current expression state (includes the context)
EvaluationException
- if something went wrong trying to determine if the node supports writingpublic void setValue(ExpressionState expressionState, java.lang.Object newValue) throws EvaluationException
SpelNode
setValue
in interface SpelNode
expressionState
- 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 SpelNode
public int getChildCount()
getChildCount
in interface SpelNode
public java.lang.Class<?> getObjectClass(java.lang.Object obj)
SpelNode
getObjectClass
in interface SpelNode
protected final <T> T getValue(ExpressionState state, java.lang.Class<T> desiredReturnType) throws EvaluationException
EvaluationException
public abstract TypedValue getValueInternal(ExpressionState expressionState) throws EvaluationException
EvaluationException
public abstract java.lang.String toStringAST()
toStringAST
in interface SpelNode
public int getStartPosition()
getStartPosition
in interface SpelNode
public int getEndPosition()
getEndPosition
in interface SpelNode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |