public interface

EvaluationContext

org.springframework.expression.EvaluationContext
Known Indirect Subclasses

Class Overview

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 the EvaluationContext, StandardEvaluationContext that can be extended, rather than having to implement everything.

Summary

Public Methods
abstract BeanResolver getBeanResolver()
abstract List<ConstructorResolver> getConstructorResolvers()
abstract List<MethodResolver> getMethodResolvers()
abstract OperatorOverloader getOperatorOverloader()
abstract List<PropertyAccessor> getPropertyAccessors()
abstract TypedValue getRootObject()
abstract TypeComparator getTypeComparator()
abstract TypeConverter getTypeConverter()
abstract TypeLocator getTypeLocator()
abstract Object lookupVariable(String name)
Look up a named variable within this evaluation context.
abstract void setVariable(String name, Object value)
Set a named variable within this evaluation context to a specified value.

Public Methods

public abstract BeanResolver getBeanResolver ()

Returns
  • a bean resolver that can look up beans by name

public abstract List<ConstructorResolver> getConstructorResolvers ()

Returns
  • a list of resolvers that will be asked in turn to locate a constructor

public abstract List<MethodResolver> getMethodResolvers ()

Returns
  • a list of resolvers that will be asked in turn to locate a method

public abstract OperatorOverloader getOperatorOverloader ()

Returns
  • an operator overloader that may support mathematical operations between more than the standard set of types

public abstract List<PropertyAccessor> getPropertyAccessors ()

Returns
  • a list of accessors that will be asked in turn to read/write a property

public abstract TypedValue getRootObject ()

Returns
  • the default root context object against which unqualified properties/methods/etc should be resolved. This can be overridden when evaluating an expression.

public abstract TypeComparator getTypeComparator ()

Returns
  • a type comparator for comparing pairs of objects for equality.

public abstract TypeConverter getTypeConverter ()

Returns
  • a type converter that can convert (or coerce) a value from one type to another.

public abstract TypeLocator getTypeLocator ()

Returns
  • a type locator that can be used to find types, either by short or fully qualified name.

public abstract Object lookupVariable (String name)

Look up a named variable within this evaluation context.

Parameters
name variable to lookup
Returns
  • the value of the variable

public abstract void setVariable (String name, Object value)

Set a named variable within this evaluation context to a specified value.

Parameters
name variable to set
value value to be placed in the variable