public abstract class YamlImplementationCommentable extends Object implements YamlImplementation, Commentable
Modifier and Type | Field and Description |
---|---|
protected YamlConfigurationOptions |
options
Configuration options for loading and dumping Yaml.
|
protected YamlCommentMapper |
yamlCommentMapper
A comment mapper to add comments to sections or values
|
Constructor and Description |
---|
YamlImplementationCommentable() |
Modifier and Type | Method and Description |
---|---|
void |
configure(YamlConfigurationOptions options)
Apply the configuration options to this implementation.
|
String |
getComment(String path,
CommentType type)
Retrieve the comment of the section or value selected by path.
|
YamlCommentMapper |
getCommentMapper()
Get the comment mapper to get or set comments.
|
void |
setComment(String path,
String comment,
CommentType type)
Set a comment to the section or value selected by path.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dump, dump, load, load, load
getComment, setComment
protected YamlCommentMapper yamlCommentMapper
protected YamlConfigurationOptions options
public void setComment(String path, String comment, CommentType type)
Commentable
setComment
in interface Commentable
path
- path of desired section or keycomment
- the comment to add, # symbol is not neededtype
- either above (BLOCK) or SIDEpublic String getComment(String path, CommentType type)
Commentable
getComment
in interface Commentable
path
- path of desired section or keytype
- either above (BLOCK) or SIDEpublic YamlCommentMapper getCommentMapper()
public void configure(YamlConfigurationOptions options)
YamlImplementation
configure
in interface YamlImplementation
options
- yaml optionsCopyright © 2023. All rights reserved.