Enum Class YmlFeature
- All Implemented Interfaces:
Serializable, Comparable<YmlFeature>, Constable
YAML Feature - Enumeration of YAML processing features
YAML 特性 - YAML 处理特性的枚举
This enum defines optional features that YAML providers may support.
此枚举定义了 YAML 提供者可能支持的可选特性。
Features | 主要功能:
- Feature flags for safe mode, block/flow style, comments, YAML 1.2, anchors, multi-doc, etc. - 安全模式、块/流风格、注释、YAML 1.2、锚点、多文档等特性标志
Usage Examples | 使用示例:
// Check if provider supports a feature
boolean hasSafeMode = provider.supports(YmlFeature.SAFE_MODE);
Security | 安全性:
- Thread-safe: Yes (enum constants are immutable) - 线程安全: 是(枚举常量不可变)
- Null-safe: N/A - 空值安全: 不适用
- Since:
- JDK 25, opencode-base-yml V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAllow duplicate keys in mappings 允许映射中的重复键Allow recursive keys 允许递归键Support anchors and aliases 支持锚点和别名Use block style for output 使用块风格输出Support custom tags 支持自定义标签Use flow style for output 使用流式风格输出Support multi-document parsing 支持多文档解析Preserve comments during parsing 解析时保留注释Pretty print output 美化打印输出Enable safe mode (restrict type deserialization) 启用安全模式(限制类型反序列化)Strict type checking 严格类型检查Support YAML 1.2 specification 支持 YAML 1.2 规范 -
Method Summary
Modifier and TypeMethodDescriptionstatic YmlFeatureReturns the enum constant of this class with the specified name.static YmlFeature[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ALLOW_DUPLICATE_KEYS
Allow duplicate keys in mappings 允许映射中的重复键 -
ALLOW_RECURSIVE_KEYS
Allow recursive keys 允许递归键 -
SAFE_MODE
Enable safe mode (restrict type deserialization) 启用安全模式(限制类型反序列化) -
BLOCK_STYLE
Use block style for output 使用块风格输出 -
FLOW_STYLE
Use flow style for output 使用流式风格输出 -
PRESERVE_COMMENTS
Preserve comments during parsing 解析时保留注释 -
YAML_1_2
Support YAML 1.2 specification 支持 YAML 1.2 规范 -
ANCHORS_ALIASES
Support anchors and aliases 支持锚点和别名 -
CUSTOM_TAGS
Support custom tags 支持自定义标签 -
MULTI_DOCUMENT
Support multi-document parsing 支持多文档解析 -
PRETTY_PRINT
Pretty print output 美化打印输出 -
STRICT_TYPES
Strict type checking 严格类型检查
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-