Package org.springframework.expression
Interface EvaluationContext
- All Known Implementing Classes:
- MethodBasedEvaluationContext,- SimpleEvaluationContext,- StandardEvaluationContext
public interface EvaluationContext
Expressions are executed in an evaluation context. It is in this context that
 references are resolved when encountered during expression evaluation.
 
There is a default implementation of this EvaluationContext interface:
 StandardEvaluationContext
 which can be extended, rather than having to implement everything manually.
- Since:
- 3.0
- Author:
- Andy Clement, Juergen Hoeller
- 
Method SummaryModifier and TypeMethodDescriptionReturn a bean resolver that can look up beans by name.Return a list of resolvers that will be asked in turn to locate a constructor.Return a list of resolvers that will be asked in turn to locate a method.Return an operator overloader that may support mathematical operations between more than the standard set of types.Return a list of accessors that will be asked in turn to read/write a property.Return the default root context object against which unqualified properties/methods/etc should be resolved.Return a type comparator for comparing pairs of objects for equality.Return a type converter that can convert (or coerce) a value from one type to another.Return a type locator that can be used to find types, either by short or fully qualified name.lookupVariable(String name) Look up a named variable within this evaluation context.voidsetVariable(String name, Object value) Set a named variable within this evaluation context to a specified value.
- 
Method Details- 
getRootObjectTypedValue getRootObject()Return the default root context object against which unqualified properties/methods/etc should be resolved. This can be overridden when evaluating an expression.
- 
getPropertyAccessorsList<PropertyAccessor> getPropertyAccessors()Return a list of accessors that will be asked in turn to read/write a property.
- 
getConstructorResolversList<ConstructorResolver> getConstructorResolvers()Return a list of resolvers that will be asked in turn to locate a constructor.
- 
getMethodResolversList<MethodResolver> getMethodResolvers()Return a list of resolvers that will be asked in turn to locate a method.
- 
getBeanResolverReturn a bean resolver that can look up beans by name.
- 
getTypeLocatorTypeLocator getTypeLocator()Return a type locator that can be used to find types, either by short or fully qualified name.
- 
getTypeConverterTypeConverter getTypeConverter()Return a type converter that can convert (or coerce) a value from one type to another.
- 
getTypeComparatorTypeComparator getTypeComparator()Return a type comparator for comparing pairs of objects for equality.
- 
getOperatorOverloaderOperatorOverloader getOperatorOverloader()Return an operator overloader that may support mathematical operations between more than the standard set of types.
- 
setVariableSet a named variable within this evaluation context to a specified value.- Parameters:
- name- the name of the variable to set
- value- the value to be placed in the variable
 
- 
lookupVariableLook up a named variable within this evaluation context.- Parameters:
- name- variable to lookup
- Returns:
- the value of the variable, or nullif not found
 
 
-