Class ExpressionState
java.lang.Object
org.springframework.expression.spel.ExpressionState
An ExpressionState is for maintaining per-expression-evaluation state, any changes to
 it are not seen by other expressions but it gives a place to hold local variables and
 for component expressions in a compound expression to communicate state. This is in
 contrast to the EvaluationContext, which is shared amongst expression evaluations, and
 any changes to it will be seen by other expressions or any code that chooses to ask
 questions of the context.
 
It also acts as a place for to define common utility routines that the various AST nodes might need.
- Since:
- 3.0
- Author:
- Andy Clement, Juergen Hoeller
- 
Constructor SummaryConstructorsConstructorDescriptionExpressionState(EvaluationContext context) ExpressionState(EvaluationContext context, SpelParserConfiguration configuration) ExpressionState(EvaluationContext context, TypedValue rootObject) ExpressionState(EvaluationContext context, TypedValue rootObject, SpelParserConfiguration configuration) 
- 
Method SummaryModifier and TypeMethodDescriptionconvertValue(Object value, TypeDescriptor targetTypeDescriptor) convertValue(TypedValue value, TypeDescriptor targetTypeDescriptor) voidvoidenterScope(String name, Object value) voidenterScope(Map<String, Object> argMap) voidClass<?>The active context object is what unqualified references to properties/etc are resolved against.lookupLocalVariable(String name) lookupVariable(String name) voidvoidvoidsetLocalVariable(String name, Object value) voidsetVariable(String name, Object value) 
- 
Constructor Details- 
ExpressionState
- 
ExpressionState
- 
ExpressionState
- 
ExpressionStatepublic ExpressionState(EvaluationContext context, TypedValue rootObject, SpelParserConfiguration configuration) 
 
- 
- 
Method Details- 
getActiveContextObjectThe active context object is what unqualified references to properties/etc are resolved against.
- 
pushActiveContextObject
- 
popActiveContextObjectpublic void popActiveContextObject()
- 
getRootContextObject
- 
getScopeRootContextObject
- 
setVariable
- 
lookupVariable
- 
getTypeComparator
- 
findType- Throws:
- EvaluationException
 
- 
convertValuepublic Object convertValue(Object value, TypeDescriptor targetTypeDescriptor) throws EvaluationException - Throws:
- EvaluationException
 
- 
getTypeConverter
- 
convertValue@Nullable public Object convertValue(TypedValue value, TypeDescriptor targetTypeDescriptor) throws EvaluationException - Throws:
- EvaluationException
 
- 
enterScope
- 
enterScopepublic void enterScope()
- 
enterScope
- 
exitScopepublic void exitScope()
- 
setLocalVariable
- 
lookupLocalVariable
- 
operatepublic TypedValue operate(Operation op, @Nullable Object left, @Nullable Object right) throws EvaluationException - Throws:
- EvaluationException
 
- 
getPropertyAccessors
- 
getEvaluationContext
- 
getConfiguration
 
-