public static enum Comments.Position extends Enum<Comments.Position>
| Enum Constant and Description |
|---|
AFTER
Puts the comments after the key/value node.
|
BEFORE
Puts the comments before the key/value node.
|
INLINE
Puts the comments inline with the key/value node.
|
| Modifier and Type | Method and Description |
|---|---|
static Comments.Position |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Comments.Position[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Comments.Position BEFORE
Serialization:
FlowStyle.BLOCK: always serializedFlowStyle.FLOW: serialized only with the root sectionCompatibility:
CommentType.IN_LINE is not allowed to be used at this position. You can use Comments.create(String, Position) to create comments with guaranteed compatibility.
public static final Comments.Position INLINE
Serialization:
FlowStyle.BLOCK: serialized only with keys and values that are represented as a scalar (not a map, section, or an array-like object)FlowStyle.FLOW: serialized only with keys and values that are represented as a map, section or an array-like objectCompatibility:
CommentType.IN_LINE is the only comment type allowed at this position. You can use Comments.create(String, Position) to create comments with guaranteed compatibility.
public static final Comments.Position AFTER
Serialization:
FlowStyle.BLOCK: always serializedFlowStyle.FLOW: serialized only with the root sectionBEFORE comments for that block. An attempt to dump a document with comments set at
this position will cause them to permanently be lost.
Compatibility:
CommentType.IN_LINE is the only comment type allowed at this position. You can use Comments.create(String, Position) to create comments with guaranteed compatibility.
public static Comments.Position[] values()
for (Comments.Position c : Comments.Position.values()) System.out.println(c);
public static Comments.Position valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2024. All rights reserved.