Class YmlSafeLoader.Builder
java.lang.Object
cloud.opencode.base.yml.security.YmlSafeLoader.Builder
- Enclosing class:
YmlSafeLoader
Safe Loader Builder
安全加载器构建器
- Since:
- JDK 25, opencode-base-yml V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptionAllows a type for deserialization.allowTypes(Class<?>... types) Allows multiple types for deserialization.build()Builds the safe loader.Denies a YAML tag.maxAliases(int maxAliases) Sets the maximum number of aliases.maxDepth(int maxDepth) Sets the maximum nesting depth.maxSize(int maxSize) Sets the maximum document size.
-
Method Details
-
allowType
Allows a type for deserialization. 允许反序列化的类型。- Parameters:
type- the type to allow | 要允许的类型- Returns:
- this builder | 此构建器
-
allowTypes
Allows multiple types for deserialization. 允许多个反序列化的类型。- Parameters:
types- the types to allow | 要允许的类型- Returns:
- this builder | 此构建器
-
denyTag
Denies a YAML tag. 拒绝 YAML 标签。- Parameters:
tag- the tag to deny | 要拒绝的标签- Returns:
- this builder | 此构建器
-
maxDepth
Sets the maximum nesting depth. 设置最大嵌套深度。- Parameters:
maxDepth- the max depth | 最大深度- Returns:
- this builder | 此构建器
-
maxSize
Sets the maximum document size. 设置最大文档大小。- Parameters:
maxSize- the max size | 最大大小- Returns:
- this builder | 此构建器
-
maxAliases
Sets the maximum number of aliases. 设置最大别名数。- Parameters:
maxAliases- the max aliases | 最大别名数- Returns:
- this builder | 此构建器
-
build
-