Interface YamlImplementation

All Known Implementing Classes:
SimpleYamlImplementation, SnakeYamlImplementation, YamlImplementationCommentable

public interface YamlImplementation
A YAML implementation to load/parse and dump/save a ConfigurationSection.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Apply the configuration options to this implementation.
    void
    dump(Writer writer, org.simpleyaml.configuration.ConfigurationSection section)
    Dump section values to Yaml.
    default String
    dump(org.simpleyaml.configuration.ConfigurationSection section)
    Dump section values to a Yaml string.
    void
    load(Reader reader, org.simpleyaml.configuration.ConfigurationSection section)
    Load Yaml to a configuration section.
    default void
    load(String contents, org.simpleyaml.configuration.ConfigurationSection section)
    Load Yaml to a configuration section.
    default void
    load(org.simpleyaml.utils.SupplierIO.Reader readerSupplier, org.simpleyaml.configuration.ConfigurationSection section)
    Load Yaml to a configuration section.
  • Method Details

    • load

      void load(Reader reader, org.simpleyaml.configuration.ConfigurationSection section) throws IOException, org.simpleyaml.exceptions.InvalidConfigurationException
      Load Yaml to a configuration section.
      Parameters:
      reader - a reader of Yaml contents to load
      section - the configuration to fill with the contents
      Throws:
      IOException - if cannot read contents.
      org.simpleyaml.exceptions.InvalidConfigurationException - if contents is not a valid Yaml configuration
    • load

      default void load(org.simpleyaml.utils.SupplierIO.Reader readerSupplier, org.simpleyaml.configuration.ConfigurationSection section) throws IOException, org.simpleyaml.exceptions.InvalidConfigurationException
      Load Yaml to a configuration section.
      Parameters:
      readerSupplier - a function providing a reader of Yaml contents to load
      section - the configuration to fill with the contents
      Throws:
      IOException - if cannot read contents.
      org.simpleyaml.exceptions.InvalidConfigurationException - if contents is not a valid Yaml configuration
    • load

      default void load(String contents, org.simpleyaml.configuration.ConfigurationSection section) throws IOException, org.simpleyaml.exceptions.InvalidConfigurationException
      Load Yaml to a configuration section.
      Parameters:
      contents - a Yaml string with contents to load
      section - the configuration to fill with the contents
      Throws:
      IOException - if cannot read contents.
      org.simpleyaml.exceptions.InvalidConfigurationException - if contents is not a valid Yaml string
    • dump

      void dump(Writer writer, org.simpleyaml.configuration.ConfigurationSection section) throws IOException
      Dump section values to Yaml.
      Parameters:
      writer - writer to dump values
      section - section with values to dump
      Throws:
      IOException
    • dump

      default String dump(org.simpleyaml.configuration.ConfigurationSection section) throws IOException
      Dump section values to a Yaml string.
      Parameters:
      section - section with values to dump
      Returns:
      the values as a valid Yaml string
      Throws:
      IOException
    • configure

      void configure(YamlConfigurationOptions options)
      Apply the configuration options to this implementation.
      Parameters:
      options - yaml options