Class MethodBasedEvaluationContext
java.lang.Object
org.springframework.expression.spel.support.StandardEvaluationContext
org.springframework.context.expression.MethodBasedEvaluationContext
- All Implemented Interfaces:
EvaluationContext
A method-based
EvaluationContext 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
- Since:
- 4.2
- Author:
- Stephane Nicoll, Juergen Hoeller, Sebastien Deleuze
-
Constructor Summary
ConstructorsConstructorDescriptionMethodBasedEvaluationContext(@Nullable Object rootObject, Method method, @Nullable Object[] arguments, ParameterNameDiscoverer parameterNameDiscoverer) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidLoad the param information only when needed.lookupVariable(String name) Look up a named variable or function within this evaluation context.Methods inherited from class StandardEvaluationContext
addConstructorResolver, addIndexAccessor, addMethodResolver, addPropertyAccessor, applyDelegatesTo, getBeanResolver, getConstructorResolvers, getIndexAccessors, getMethodResolvers, getOperatorOverloader, getPropertyAccessors, getRootObject, getTypeComparator, getTypeConverter, getTypeLocator, registerFunction, registerFunction, registerMethodFilter, removeConstructorResolver, removeIndexAccessor, removeMethodResolver, removePropertyAccessor, setBeanResolver, setConstructorResolvers, setIndexAccessors, setMethodResolvers, setOperatorOverloader, setPropertyAccessors, setRootObject, setRootObject, setTypeComparator, setTypeConverter, setTypeLocator, setVariable, setVariablesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EvaluationContext
assignVariable, isAssignmentEnabled
-
Constructor Details
-
MethodBasedEvaluationContext
-
-
Method Details
-
lookupVariable
Description copied from class:StandardEvaluationContextLook up a named variable or function within this evaluation context.Note that variables and functions share a common namespace in this evaluation context. See the class-level documentation for details.
- Specified by:
lookupVariablein interfaceEvaluationContext- Overrides:
lookupVariablein classStandardEvaluationContext- Parameters:
name- the name of the variable or function to look up- Returns:
- the value of the variable or function, or
nullif not found
-
lazyLoadArguments
protected void lazyLoadArguments()Load the param information only when needed.
-