Package ninja.leaping.configurate.yaml
Class YAMLConfigurationLoader
java.lang.Object
ninja.leaping.configurate.loader.AbstractConfigurationLoader<ConfigurationNode>
ninja.leaping.configurate.yaml.YAMLConfigurationLoader
- All Implemented Interfaces:
ConfigurationLoader<ConfigurationNode>
public class YAMLConfigurationLoader extends AbstractConfigurationLoader<ConfigurationNode>
A loader for YAML-formatted configurations, using the SnakeYAML library for parsing and generation.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
YAMLConfigurationLoader.Builder
Builds aYAMLConfigurationLoader
. -
Field Summary
Fields inherited from class ninja.leaping.configurate.loader.AbstractConfigurationLoader
CONFIGURATE_LINE_SEPARATOR, LINE_SPLITTER, sink, source, SYSTEM_LINE_SEPARATOR
-
Method Summary
Modifier and Type Method Description static @NonNull YAMLConfigurationLoader.Builder
builder()
Creates a newYAMLConfigurationLoader
builder.@NonNull ConfigurationNode
createEmptyNode(@NonNull ConfigurationOptions options)
Return an empty node of the most appropriate type for this loaderprotected void
loadInternal(ConfigurationNode node, BufferedReader reader)
protected void
saveInternal(ConfigurationNode node, Writer writer)
Methods inherited from class ninja.leaping.configurate.loader.AbstractConfigurationLoader
canLoad, canSave, getDefaultCommentHandler, getDefaultOptions, load, save, writeHeaderInternal
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ninja.leaping.configurate.loader.ConfigurationLoader
createEmptyNode, load, loadToReference
-
Method Details
-
builder
Creates a newYAMLConfigurationLoader
builder.- Returns:
- A new builder
-
loadInternal
- Specified by:
loadInternal
in classAbstractConfigurationLoader<ConfigurationNode>
- Throws:
IOException
-
saveInternal
- Specified by:
saveInternal
in classAbstractConfigurationLoader<ConfigurationNode>
- Throws:
IOException
-
createEmptyNode
Description copied from interface:ConfigurationLoader
Return an empty node of the most appropriate type for this loader- Parameters:
options
- The options to use with this node. Must not be null (seeConfigurationOptions.defaults()
)- Returns:
- The appropriate node type
-