Class YmlSafeLoader.Builder

java.lang.Object
cloud.opencode.base.yml.security.YmlSafeLoader.Builder
Enclosing class:
YmlSafeLoader

public static final class YmlSafeLoader.Builder extends Object
Safe Loader Builder 安全加载器构建器
Since:
JDK 25, opencode-base-yml V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Method Details

    • allowType

      public YmlSafeLoader.Builder allowType(Class<?> type)
      Allows a type for deserialization. 允许反序列化的类型。
      Parameters:
      type - the type to allow | 要允许的类型
      Returns:
      this builder | 此构建器
    • allowTypes

      public YmlSafeLoader.Builder allowTypes(Class<?>... types)
      Allows multiple types for deserialization. 允许多个反序列化的类型。
      Parameters:
      types - the types to allow | 要允许的类型
      Returns:
      this builder | 此构建器
    • denyTag

      public YmlSafeLoader.Builder denyTag(String tag)
      Denies a YAML tag. 拒绝 YAML 标签。
      Parameters:
      tag - the tag to deny | 要拒绝的标签
      Returns:
      this builder | 此构建器
    • maxDepth

      public YmlSafeLoader.Builder maxDepth(int maxDepth)
      Sets the maximum nesting depth. 设置最大嵌套深度。
      Parameters:
      maxDepth - the max depth | 最大深度
      Returns:
      this builder | 此构建器
    • maxSize

      public YmlSafeLoader.Builder maxSize(int maxSize)
      Sets the maximum document size. 设置最大文档大小。
      Parameters:
      maxSize - the max size | 最大大小
      Returns:
      this builder | 此构建器
    • maxAliases

      public YmlSafeLoader.Builder maxAliases(int maxAliases)
      Sets the maximum number of aliases. 设置最大别名数。
      Parameters:
      maxAliases - the max aliases | 最大别名数
      Returns:
      this builder | 此构建器
    • build

      public YmlSafeLoader build()
      Builds the safe loader. 构建安全加载器。
      Returns:
      the safe loader | 安全加载器