Class StandardContext.Builder

java.lang.Object
cloud.opencode.base.expression.context.StandardContext.Builder
Enclosing class:
StandardContext

public static class StandardContext.Builder extends Object
Builder for StandardContext StandardContext构建器
Since:
JDK 25, opencode-base-expression V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • rootObject

      public StandardContext.Builder rootObject(Object rootObject)
      Set root object 设置根对象
      Parameters:
      rootObject - the root object | 根对象
      Returns:
      this builder | 此构建器
    • functionRegistry

      public StandardContext.Builder functionRegistry(FunctionRegistry registry)
      Set function registry 设置函数注册表
      Parameters:
      registry - the registry | 注册表
      Returns:
      this builder | 此构建器
    • addPropertyAccessor

      public StandardContext.Builder addPropertyAccessor(PropertyAccessor accessor)
      Add property accessor 添加属性访问器
      Parameters:
      accessor - the accessor | 访问器
      Returns:
      this builder | 此构建器
    • typeConverter

      public StandardContext.Builder typeConverter(TypeConverter converter)
      Set type converter 设置类型转换器
      Parameters:
      converter - the converter | 转换器
      Returns:
      this builder | 此构建器
    • sandbox

      public StandardContext.Builder sandbox(Sandbox sandbox)
      Set sandbox 设置沙箱
      Parameters:
      sandbox - the sandbox | 沙箱
      Returns:
      this builder | 此构建器
    • build

      public StandardContext build()
      Build the context 构建上下文
      Returns:
      the context | 上下文