Class ExpressionCompiler.Builder

java.lang.Object
cloud.opencode.base.expression.compiler.ExpressionCompiler.Builder
Enclosing class:
ExpressionCompiler

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

    • Builder

      public Builder()
  • Method Details

    • cache

      Set the cache 设置缓存
      Parameters:
      cache - the cache | 缓存
      Returns:
      this builder | 此构建器
    • noCache

      public ExpressionCompiler.Builder noCache()
      Disable caching 禁用缓存
      Returns:
      this builder | 此构建器
    • cacheSize

      public ExpressionCompiler.Builder cacheSize(int maxSize)
      Set custom cache size 设置自定义缓存大小
      Parameters:
      maxSize - the max size | 最大大小
      Returns:
      this builder | 此构建器
    • optimizer

      public ExpressionCompiler.Builder optimizer(Optimizer optimizer)
      Set the optimizer 设置优化器
      Parameters:
      optimizer - the optimizer | 优化器
      Returns:
      this builder | 此构建器
    • optimization

      public ExpressionCompiler.Builder optimization(boolean enabled)
      Enable or disable optimization 启用或禁用优化
      Parameters:
      enabled - true to enable | true 表示启用
      Returns:
      this builder | 此构建器
    • noOptimization

      public ExpressionCompiler.Builder noOptimization()
      Disable optimization 禁用优化
      Returns:
      this builder | 此构建器
    • build

      public ExpressionCompiler build()
      Build the compiler 构建编译器
      Returns:
      the compiler | 编译器