类 MethodBasedEvaluationContext
- java.lang.Object
- org.springframework.expression.spel.support.StandardEvaluationContext
- org.springframework.context.expression.MethodBasedEvaluationContext
- 所有已实现的接口:
EvaluationContext
public class MethodBasedEvaluationContext extends StandardEvaluationContext
A method-basedEvaluationContext
that provides explicit support for method-based invocations.Expose the actual method arguments using the following aliases:
- pX where X is the index of the argument (p0 for the first argument)
- aX where X is the index of the argument (a1 for the second argument)
- the name of the parameter as discovered by a configurable
ParameterNameDiscoverer
- 从以下版本开始:
- 4.2
- 作者:
- Stephane Nicoll, Juergen Hoeller
构造器概要
构造器 构造器 说明 MethodBasedEvaluationContext(Object rootObject, Method method, Object[] arguments, ParameterNameDiscoverer parameterNameDiscoverer)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected void
lazyLoadArguments()
Load the param information only when needed.Object
lookupVariable(String name)
Look up a named variable within this evaluation context.从类继承的方法 org.springframework.expression.spel.support.StandardEvaluationContext
addConstructorResolver, addMethodResolver, addPropertyAccessor, getBeanResolver, getConstructorResolvers, getMethodResolvers, getOperatorOverloader, getPropertyAccessors, getRootObject, getTypeComparator, getTypeConverter, getTypeLocator, registerFunction, registerMethodFilter, removeConstructorResolver, removeMethodResolver, removePropertyAccessor, setBeanResolver, setConstructorResolvers, setMethodResolvers, setOperatorOverloader, setPropertyAccessors, setRootObject, setRootObject, setTypeComparator, setTypeConverter, setTypeLocator, setVariable, setVariables
构造器详细资料
MethodBasedEvaluationContext
public MethodBasedEvaluationContext(Object rootObject, Method method, Object[] arguments, ParameterNameDiscoverer parameterNameDiscoverer)
方法详细资料
lookupVariable
public Object lookupVariable(String name)
从接口复制的说明:EvaluationContext
Look up a named variable within this evaluation context.- 指定者:
lookupVariable
在接口中EvaluationContext
- 覆盖:
lookupVariable
在类中StandardEvaluationContext
- 参数:
name
- variable to lookup- 返回:
- the value of the variable, or
null
if not found
lazyLoadArguments
protected void lazyLoadArguments()
Load the param information only when needed.