Class HoconConfigurationLoader
- java.lang.Object
-
- org.spongepowered.configurate.loader.AbstractConfigurationLoader<CommentedConfigurationNode>
-
- org.spongepowered.configurate.hocon.HoconConfigurationLoader
-
- All Implemented Interfaces:
ConfigurationNodeFactory<CommentedConfigurationNode>
,ConfigurationLoader<CommentedConfigurationNode>
public final class HoconConfigurationLoader extends AbstractConfigurationLoader<CommentedConfigurationNode>
A loader for HOCON (Hodor)-formatted configurations, using the lightbend config library for parsing and generation.- Since:
- 4.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HoconConfigurationLoader.Builder
Builds aHoconConfigurationLoader
.
-
Field Summary
-
Fields inherited from class org.spongepowered.configurate.loader.AbstractConfigurationLoader
CONFIGURATE_LINE_PATTERN, CONFIGURATE_LINE_SEPARATOR, sink, source, SYSTEM_LINE_SEPARATOR
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HoconConfigurationLoader.Builder
builder()
Creates a newHoconConfigurationLoader
builder.protected void
checkCanWrite(ConfigurationNode node)
CommentedConfigurationNode
createNode(ConfigurationOptions options)
protected void
loadInternal(CommentedConfigurationNode node, java.io.BufferedReader reader)
protected void
saveInternal(ConfigurationNode node, java.io.Writer writer)
-
Methods inherited from class org.spongepowered.configurate.loader.AbstractConfigurationLoader
canLoad, canSave, defaultCommentHandler, defaultOptions, load, loadToReference, save, writeHeaderInternal
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.spongepowered.configurate.loader.ConfigurationLoader
load
-
Methods inherited from interface org.spongepowered.configurate.ConfigurationNodeFactory
createNode, createNode, createNode, toListCollector, toListCollector, toMapCollector, toMapCollector
-
-
-
-
Method Detail
-
builder
public static HoconConfigurationLoader.Builder builder()
Creates a newHoconConfigurationLoader
builder.- Returns:
- a new builder
- Since:
- 4.0.0
-
checkCanWrite
protected void checkCanWrite(ConfigurationNode node) throws ConfigurateException
- Overrides:
checkCanWrite
in classAbstractConfigurationLoader<CommentedConfigurationNode>
- Throws:
ConfigurateException
-
loadInternal
protected void loadInternal(CommentedConfigurationNode node, java.io.BufferedReader reader) throws ParsingException
- Specified by:
loadInternal
in classAbstractConfigurationLoader<CommentedConfigurationNode>
- Throws:
ParsingException
-
saveInternal
protected void saveInternal(ConfigurationNode node, java.io.Writer writer) throws ConfigurateException
- Specified by:
saveInternal
in classAbstractConfigurationLoader<CommentedConfigurationNode>
- Throws:
ConfigurateException
-
createNode
public CommentedConfigurationNode createNode(ConfigurationOptions options)
-
-