Class YamlConfigurationLoader
java.lang.Object
org.spongepowered.configurate.loader.AbstractConfigurationLoader<CommentedConfigurationNode>
org.spongepowered.configurate.yaml.YamlConfigurationLoader
- All Implemented Interfaces:
ConfigurationNodeFactory<CommentedConfigurationNode>,ConfigurationLoader<CommentedConfigurationNode>
public final class YamlConfigurationLoader
extends AbstractConfigurationLoader<CommentedConfigurationNode>
A loader for YAML-formatted configurations, using the SnakeYAML library for
parsing and generation.
- Since:
- 4.0.0
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RepresentationHint<Integer>The amount of blank lines that a specific node should have.static final RepresentationHint<NodeStyle>The YAML node style to use for collection nodes.static final RepresentationHint<ScalarStyle>The YAML scalar style this node should attempt to use.Fields inherited from class org.spongepowered.configurate.loader.AbstractConfigurationLoader
CONFIGURATE_LINE_PATTERN, CONFIGURATE_LINE_SEPARATOR, sink, source, SYSTEM_LINE_SEPARATOR -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a newYamlConfigurationLoaderbuilder.createNode(ConfigurationOptions options) protected voidloadInternal(CommentedConfigurationNode node, BufferedReader reader) protected voidsaveInternal(ConfigurationNode node, Writer writer) Methods inherited from class org.spongepowered.configurate.loader.AbstractConfigurationLoader
canLoad, canSave, checkCanWrite, defaultCommentHandler, defaultOptions, load, loadToReference, save, writeHeaderInternalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.spongepowered.configurate.loader.ConfigurationLoader
loadMethods inherited from interface org.spongepowered.configurate.ConfigurationNodeFactory
createNode, createNode, createNode, toListCollector, toListCollector, toMapCollector, toMapCollector
-
Field Details
-
SCALAR_STYLE
The YAML scalar style this node should attempt to use.If the chosen scalar style would produce syntactically invalid YAML, a valid one will replace it.
- Since:
- 4.3.0
-
NODE_STYLE
The YAML node style to use for collection nodes. Anullvalue will instruct the emitter to fall back to theYamlConfigurationLoader.Builder.nodeStyle()setting.- Since:
- 4.3.0
-
BLANK_LINE_STYLE_OVERRIDE
The amount of blank lines that a specific node should have. Absent is to inherit theBlankLineStyleof the document.- Since:
- 4.3.0
-
-
Method Details
-
builder
Creates a newYamlConfigurationLoaderbuilder.- Returns:
- a new builder
- Since:
- 4.0.0
-
loadInternal
- Specified by:
loadInternalin classAbstractConfigurationLoader<CommentedConfigurationNode>
-
saveInternal
- Specified by:
saveInternalin classAbstractConfigurationLoader<CommentedConfigurationNode>
-
createNode
-