类 StandardEvaluationContext

java.lang.Object
cn.taketoday.expression.spel.support.StandardEvaluationContext
所有已实现的接口:
EvaluationContext

public class StandardEvaluationContext extends Object implements EvaluationContext
A powerful and highly configurable EvaluationContext implementation.

This context uses standard implementations of all applicable strategies, based on reflection to resolve properties, methods, and fields. Note, however, that you may need to manually configure a StandardTypeLocator with a specific ClassLoader to ensure that the SpEL expression parser is able to reliably locate user types. See setTypeLocator(TypeLocator) for details.

In addition to support for setting and looking up variables as defined in the EvaluationContext API, StandardEvaluationContext also provides support for registering and looking up functions. The registerFunction(...) methods provide a convenient way to register a function as a Method or a MethodHandle; however, a function can also be registered via setVariable(String, Object) or setVariables(Map). Since functions share a namespace with the variables in this evaluation context, care must be taken to ensure that function names and variable names do not overlap.

For a simpler builder-style context variant for data-binding purposes, consider using SimpleEvaluationContext instead which allows for opting into several SpEL features as needed by specific evaluation cases.

从以下版本开始:
4.0
作者:
Andy Clement, Juergen Hoeller, Sam Brannen, Harry Yang
另请参阅: