Class YamlImplementationCommentable
java.lang.Object
org.simpleyaml.configuration.implementation.api.YamlImplementationCommentable
- All Implemented Interfaces:
org.simpleyaml.configuration.comments.Commentable,YamlImplementation
- Direct Known Subclasses:
SnakeYamlImplementation
public abstract class YamlImplementationCommentable
extends Object
implements YamlImplementation, org.simpleyaml.configuration.comments.Commentable
A YAML implementation capable of processing comments.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected YamlConfigurationOptionsConfiguration options for loading and dumping Yaml.protected YamlCommentMapperA comment mapper to add comments to sections or values -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(YamlConfigurationOptions options) Apply the configuration options to this implementation.getComment(String path, org.simpleyaml.configuration.comments.CommentType type) Get the comment mapper to get or set comments.voidsetComment(String path, String comment, org.simpleyaml.configuration.comments.CommentType type) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.simpleyaml.configuration.comments.Commentable
getComment, setComment
-
Field Details
-
yamlCommentMapper
A comment mapper to add comments to sections or values -
options
Configuration options for loading and dumping Yaml.
-
-
Constructor Details
-
YamlImplementationCommentable
public YamlImplementationCommentable()
-
-
Method Details
-
setComment
public void setComment(String path, String comment, org.simpleyaml.configuration.comments.CommentType type) - Specified by:
setCommentin interfaceorg.simpleyaml.configuration.comments.Commentable
-
getComment
- Specified by:
getCommentin interfaceorg.simpleyaml.configuration.comments.Commentable
-
getCommentMapper
Get the comment mapper to get or set comments.- Returns:
- the comment mapper or null if parsing comments is not enabled
-
configure
Description copied from interface:YamlImplementationApply the configuration options to this implementation.- Specified by:
configurein interfaceYamlImplementation- Parameters:
options- yaml options
-