Class BeanContext.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • rootObject

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

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

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

      public BeanContext.Builder variable(String name, Object value)
      Set a variable 设置变量
      Parameters:
      name - the variable name | 变量名
      value - the variable value | 变量值
      Returns:
      this builder | 此构建器
    • build

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