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 Details

    • yamlCommentMapper

      protected YamlCommentMapper yamlCommentMapper
      A comment mapper to add comments to sections or values
    • options

      protected YamlConfigurationOptions 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:
      setComment in interface org.simpleyaml.configuration.comments.Commentable
    • getComment

      public String getComment(String path, org.simpleyaml.configuration.comments.CommentType type)
      Specified by:
      getComment in interface org.simpleyaml.configuration.comments.Commentable
    • getCommentMapper

      public YamlCommentMapper getCommentMapper()
      Get the comment mapper to get or set comments.
      Returns:
      the comment mapper or null if parsing comments is not enabled
    • configure

      public void configure(YamlConfigurationOptions options)
      Description copied from interface: YamlImplementation
      Apply the configuration options to this implementation.
      Specified by:
      configure in interface YamlImplementation
      Parameters:
      options - yaml options