Class SimpleEvaluationContext.Builder
java.lang.Object
org.springframework.expression.spel.support.SimpleEvaluationContext.Builder
- Enclosing class:
SimpleEvaluationContext
Builder for
SimpleEvaluationContext.- Since:
- 4.3.15
- Author:
- Rossen Stoyanchev, Juergen Hoeller, Sam Brannen
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Disable assignment within expressions evaluated by this evaluation context.withConversionService(ConversionService conversionService) Register a customConversionService.withIndexAccessors(IndexAccessor... indexAccessors) Register the specifiedIndexAccessordelegates.Register aDataBindingMethodResolverfor instance method invocation purposes (i.e.withMethodResolvers(MethodResolver... resolvers) Register the specifiedMethodResolverdelegates for a combination of property access and method resolution.withRootObject(Object rootObject) Specify a default root object to resolve against.withTypeConverter(TypeConverter converter) Register a customTypeConverter.withTypedRootObject(Object rootObject, TypeDescriptor typeDescriptor) Specify a typed root object to resolve against.
-
Method Details
-
withAssignmentDisabled
Disable assignment within expressions evaluated by this evaluation context.- Since:
- 5.3.38
- See Also:
-
withIndexAccessors
Register the specifiedIndexAccessordelegates.- Parameters:
indexAccessors- the index accessors to use- Since:
- 6.2
-
withMethodResolvers
Register the specifiedMethodResolverdelegates for a combination of property access and method resolution.- Parameters:
resolvers- the resolver delegates to use- See Also:
-
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.- See Also:
-
withConversionService
Register a customConversionService.By default a
StandardTypeConverterbacked by aDefaultConversionServiceis used.- See Also:
-
withTypeConverter
Register a customTypeConverter.By default a
StandardTypeConverterbacked by aDefaultConversionServiceis used.- See Also:
-
withRootObject
Specify a default root object to resolve against.Default is none, expecting an object argument at evaluation time.
- See Also:
-
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.
- See Also:
-
build
-