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 TypeMethodDescriptionvoidconfigure(YamlConfigurationOptions options) Apply the configuration options to this implementation.voidDump section values to Yaml.default Stringdump(org.simpleyaml.configuration.ConfigurationSection section) Dump section values to a Yaml string.voidLoad Yaml to a configuration section.default voidLoad Yaml to a configuration section.default voidload(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 loadsection- 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 loadsection- 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 loadsection- 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 valuessection- section with values to dump- Throws:
IOException
-
dump
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
Apply the configuration options to this implementation.- Parameters:
options- yaml options
-