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, waitdump, dump, load, load, loadgetComment, setCommentprotected YamlCommentMapper yamlCommentMapper
protected YamlConfigurationOptions options
public void setComment(String path, String comment, CommentType type)
CommentablesetComment in interface Commentablepath - 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)
CommentablegetComment in interface Commentablepath - path of desired section or keytype - either above (BLOCK) or SIDEpublic YamlCommentMapper getCommentMapper()
public void configure(YamlConfigurationOptions options)
YamlImplementationconfigure in interface YamlImplementationoptions - yaml optionsCopyright © 2023. All rights reserved.