Class AllowList.Builder
java.lang.Object
cloud.opencode.base.expression.sandbox.AllowList.Builder
- Enclosing class:
AllowList
Builder for AllowList
AllowList 构建器
- Since:
- JDK 25, opencode-base-expression V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowAllByDefault(boolean allow) Set allow all by default 设置默认允许所有allowClass(Class<?> clazz) Allow a class 允许一个类allowClass(String className) Allow a class 允许一个类allowClasses(String... classNames) Allow multiple classes 允许多个类allowMethod(String methodName) Allow a method 允许一个方法allowMethods(String... methodNames) Allow multiple methods 允许多个方法allowProperties(String... propertyNames) Allow multiple properties 允许多个属性allowProperty(String propertyName) Allow a property 允许一个属性build()Build the allow list 构建白名单
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allowClass
Allow a class 允许一个类- Parameters:
className- the class name (supports * wildcard) | 类名(支持 * 通配符)- Returns:
- this builder | 此构建器
-
allowClass
Allow a class 允许一个类- Parameters:
clazz- the class | 类- Returns:
- this builder | 此构建器
-
allowClasses
Allow multiple classes 允许多个类- Parameters:
classNames- the class names | 类名- Returns:
- this builder | 此构建器
-
allowMethod
Allow a method 允许一个方法- Parameters:
methodName- the method name (supports * wildcard) | 方法名(支持 * 通配符)- Returns:
- this builder | 此构建器
-
allowMethods
Allow multiple methods 允许多个方法- Parameters:
methodNames- the method names | 方法名- Returns:
- this builder | 此构建器
-
allowProperty
Allow a property 允许一个属性- Parameters:
propertyName- the property name (supports * wildcard) | 属性名(支持 * 通配符)- Returns:
- this builder | 此构建器
-
allowProperties
Allow multiple properties 允许多个属性- Parameters:
propertyNames- the property names | 属性名- Returns:
- this builder | 此构建器
-
allowAllByDefault
Set allow all by default 设置默认允许所有- Parameters:
allow- true to allow all by default | true 表示默认允许所有- Returns:
- this builder | 此构建器
-
build
-