Module cloud.opencode.base.expression


module cloud.opencode.base.expression
OpenCode Base Expression Module OpenCode 基础表达式引擎模块

Provides a lightweight, type-safe expression engine with comprehensive operators, property access, method calls, collection operations, and sandbox execution.

提供轻量级、类型安全的表达式引擎,支持完整的运算符、属性访问、方法调用、集合操作和沙箱执行。

Key Features | 主要功能:

  • OpenExpression - Expression engine facade - 表达式引擎门面
  • Arithmetic operators (+, -, *, /, %, **) - 算术运算符
  • Comparison operators (==, !=, >, <, >=, <=) - 比较运算符
  • Logical operators (&&, ||, !) - 逻辑运算符
  • Ternary operator (? :) - 三元运算符
  • Property access (user.name, list[0]) - 属性访问
  • Null-safe navigation (user?.address?.city) - 空安全导航
  • Method calls (str.toUpperCase()) - 方法调用
  • Collection filtering (users.?[age>18]) - 集合过滤
  • Built-in functions (string, math, collection, date) - 内置函数
  • Sandbox execution with security policies - 沙箱执行与安全策略
Since:
JDK 25, opencode-base-expression V1.0.0
Author:
Leon Soo