Class SimpleEvaluationContext.Builder
- java.lang.Object
 - org.springframework.expression.spel.support.SimpleEvaluationContext.Builder
 
- Enclosing class:
 - SimpleEvaluationContext
 
public static class SimpleEvaluationContext.Builder extends Object
Builder forSimpleEvaluationContext.
Constructor Summary
Constructors Constructor Description Builder(PropertyAccessor... accessors)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleEvaluationContextbuild()SimpleEvaluationContext.BuilderwithConversionService(ConversionService conversionService)Register a customConversionService.SimpleEvaluationContext.BuilderwithInstanceMethods()Register aDataBindingMethodResolverfor instance method invocation purposes (i.e.SimpleEvaluationContext.BuilderwithMethodResolvers(MethodResolver... resolvers)Register the specifiedMethodResolverdelegates for a combination of property access and method resolution.SimpleEvaluationContext.BuilderwithRootObject(Object rootObject)Specify a default root object to resolve against.SimpleEvaluationContext.BuilderwithTypeConverter(TypeConverter converter)Register a customTypeConverter.SimpleEvaluationContext.BuilderwithTypedRootObject(Object rootObject, TypeDescriptor typeDescriptor)Specify a typed root object to resolve against.
Constructor Detail
Builder
public Builder(PropertyAccessor... accessors)
Method Detail
withMethodResolvers
public SimpleEvaluationContext.Builder withMethodResolvers(MethodResolver... resolvers)
Register the specifiedMethodResolverdelegates for a combination of property access and method resolution.- Parameters:
 resolvers- the resolver delegates to use- See Also:
 withInstanceMethods(),SimpleEvaluationContext.forPropertyAccessors(org.springframework.expression.PropertyAccessor...)
withInstanceMethods
public SimpleEvaluationContext.Builder withInstanceMethods()
Register aDataBindingMethodResolverfor instance method invocation purposes (i.e. not supporting static methods) in addition to the specified property accessors, typically in combination with aDataBindingPropertyAccessor.
withConversionService
public SimpleEvaluationContext.Builder withConversionService(ConversionService conversionService)
Register a customConversionService.By default a
StandardTypeConverterbacked by aDefaultConversionServiceis used.
withTypeConverter
public SimpleEvaluationContext.Builder withTypeConverter(TypeConverter converter)
Register a customTypeConverter.By default a
StandardTypeConverterbacked by aDefaultConversionServiceis used.
withRootObject
public SimpleEvaluationContext.Builder withRootObject(Object rootObject)
Specify a default root object to resolve against.Default is none, expecting an object argument at evaluation time.
withTypedRootObject
public SimpleEvaluationContext.Builder withTypedRootObject(Object rootObject, TypeDescriptor typeDescriptor)
Specify a typed root object to resolve against.Default is none, expecting an object argument at evaluation time.
build
public SimpleEvaluationContext build()