public static class SimpleEvaluationContext.Builder
extends java.lang.Object
SimpleEvaluationContext
.Modifier and Type | Field and Description |
---|---|
private java.util.List<PropertyAccessor> |
accessors |
private java.util.List<MethodResolver> |
resolvers |
private TypedValue |
rootObject |
private TypeConverter |
typeConverter |
Constructor and Description |
---|
Builder(PropertyAccessor... accessors) |
Modifier and Type | Method and Description |
---|---|
SimpleEvaluationContext |
build() |
SimpleEvaluationContext.Builder |
withConversionService(ConversionService conversionService)
Register a custom
ConversionService . |
SimpleEvaluationContext.Builder |
withInstanceMethods()
Register a
DataBindingMethodResolver for instance method invocation purposes
(i.e. |
SimpleEvaluationContext.Builder |
withMethodResolvers(MethodResolver... resolvers)
Register the specified
MethodResolver delegates for
a combination of property access and method resolution. |
SimpleEvaluationContext.Builder |
withRootObject(java.lang.Object rootObject)
Specify a default root object to resolve against.
|
SimpleEvaluationContext.Builder |
withTypeConverter(TypeConverter converter)
Register a custom
TypeConverter . |
SimpleEvaluationContext.Builder |
withTypedRootObject(java.lang.Object rootObject,
TypeDescriptor typeDescriptor)
Specify a typed root object to resolve against.
|
private final java.util.List<PropertyAccessor> accessors
private java.util.List<MethodResolver> resolvers
@Nullable private TypeConverter typeConverter
@Nullable private TypedValue rootObject
public Builder(PropertyAccessor... accessors)
public SimpleEvaluationContext.Builder withMethodResolvers(MethodResolver... resolvers)
MethodResolver
delegates for
a combination of property access and method resolution.resolvers
- the resolver delegates to usewithInstanceMethods()
,
SimpleEvaluationContext.forPropertyAccessors(org.springframework.expression.PropertyAccessor...)
public SimpleEvaluationContext.Builder withInstanceMethods()
DataBindingMethodResolver
for instance method invocation purposes
(i.e. not supporting static methods) in addition to the specified property accessors,
typically in combination with a DataBindingPropertyAccessor
.public SimpleEvaluationContext.Builder withConversionService(ConversionService conversionService)
ConversionService
.
By default a StandardTypeConverter
backed by a
DefaultConversionService
is used.
public SimpleEvaluationContext.Builder withTypeConverter(TypeConverter converter)
TypeConverter
.
By default a StandardTypeConverter
backed by a
DefaultConversionService
is used.
public SimpleEvaluationContext.Builder withRootObject(java.lang.Object rootObject)
Default is none, expecting an object argument at evaluation time.
public SimpleEvaluationContext.Builder withTypedRootObject(java.lang.Object rootObject, TypeDescriptor typeDescriptor)
Default is none, expecting an object argument at evaluation time.
public SimpleEvaluationContext build()