类 SimpleEvaluationContext.Builder
- java.lang.Object
- org.springframework.expression.spel.support.SimpleEvaluationContext.Builder
public static class SimpleEvaluationContext.Builder extends Object
Builder forSimpleEvaluationContext
.
构造器概要
构造器 构造器 说明 Builder(PropertyAccessor... accessors)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 SimpleEvaluationContext
build()
SimpleEvaluationContext.Builder
withConversionService(ConversionService conversionService)
Register a customConversionService
.SimpleEvaluationContext.Builder
withInstanceMethods()
Register aDataBindingMethodResolver
for instance method invocation purposes (i.e. not supporting static methods) in addition to the specified property accessors, typically in combination with aDataBindingPropertyAccessor
.SimpleEvaluationContext.Builder
withMethodResolvers(MethodResolver... resolvers)
Register the specifiedMethodResolver
delegates for a combination of property access and method resolution.SimpleEvaluationContext.Builder
withRootObject(Object rootObject)
Specify a default root object to resolve against.SimpleEvaluationContext.Builder
withTypeConverter(TypeConverter converter)
Register a customTypeConverter
.SimpleEvaluationContext.Builder
withTypedRootObject(Object rootObject, TypeDescriptor typeDescriptor)
Specify a typed root object to resolve against.
构造器详细资料
Builder
public Builder(PropertyAccessor... accessors)
方法详细资料
withMethodResolvers
public SimpleEvaluationContext.Builder withMethodResolvers(MethodResolver... resolvers)
Register the specifiedMethodResolver
delegates for a combination of property access and method resolution.- 参数:
resolvers
- the resolver delegates to use- 另请参阅:
withInstanceMethods()
,SimpleEvaluationContext.forPropertyAccessors(org.springframework.expression.PropertyAccessor...)
withInstanceMethods
public SimpleEvaluationContext.Builder withInstanceMethods()
Register aDataBindingMethodResolver
for 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
StandardTypeConverter
backed by aDefaultConversionService
is used.
withTypeConverter
public SimpleEvaluationContext.Builder withTypeConverter(TypeConverter converter)
Register a customTypeConverter
.By default a
StandardTypeConverter
backed by aDefaultConversionService
is 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()