public class StandardEvaluationContext extends Object implements EvaluationContext
To resolve properties/methods/fields this context uses a reflection mechanism.
| Constructor and Description |
|---|
StandardEvaluationContext() |
StandardEvaluationContext(Object rootObject) |
public StandardEvaluationContext()
public StandardEvaluationContext(Object rootObject)
public void setRootObject(Object rootObject, TypeDescriptor typeDescriptor)
public void setRootObject(Object rootObject)
public TypedValue getRootObject()
getRootObject in interface EvaluationContextpublic void addConstructorResolver(ConstructorResolver resolver)
public boolean removeConstructorResolver(ConstructorResolver resolver)
public List<ConstructorResolver> getConstructorResolvers()
getConstructorResolvers in interface EvaluationContextpublic void setConstructorResolvers(List<ConstructorResolver> constructorResolvers)
public void addMethodResolver(MethodResolver resolver)
public boolean removeMethodResolver(MethodResolver methodResolver)
public List<MethodResolver> getMethodResolvers()
getMethodResolvers in interface EvaluationContextpublic void setBeanResolver(BeanResolver beanResolver)
public BeanResolver getBeanResolver()
getBeanResolver in interface EvaluationContextpublic void setMethodResolvers(List<MethodResolver> methodResolvers)
public void addPropertyAccessor(PropertyAccessor accessor)
public boolean removePropertyAccessor(PropertyAccessor accessor)
public List<PropertyAccessor> getPropertyAccessors()
getPropertyAccessors in interface EvaluationContextpublic void setPropertyAccessors(List<PropertyAccessor> propertyAccessors)
public void setTypeLocator(TypeLocator typeLocator)
public TypeLocator getTypeLocator()
getTypeLocator in interface EvaluationContextpublic void setTypeConverter(TypeConverter typeConverter)
public TypeConverter getTypeConverter()
getTypeConverter in interface EvaluationContextpublic void setTypeComparator(TypeComparator typeComparator)
public TypeComparator getTypeComparator()
getTypeComparator in interface EvaluationContextpublic void setOperatorOverloader(OperatorOverloader operatorOverloader)
public OperatorOverloader getOperatorOverloader()
getOperatorOverloader in interface EvaluationContextpublic void setVariable(String name, Object value)
EvaluationContextsetVariable in interface EvaluationContextname - variable to setvalue - value to be placed in the variablepublic Object lookupVariable(String name)
EvaluationContextlookupVariable in interface EvaluationContextname - variable to lookuppublic void registerMethodFilter(Class<?> type, MethodFilter filter) throws IllegalStateException
MethodFilter which will be called during method resolution
for the specified type.
The MethodFilter may remove methods and/or sort the methods which
will then be used by SpEL as the candidates to look through for a match.
type - the type for which the filter should be calledfilter - a MethodFilter, or null to unregister a filter for the typeIllegalStateException - if the ReflectiveMethodResolver is not in use