Class HoconConfigurationLoader
- java.lang.Object
-
- org.spongepowered.configurate.loader.AbstractConfigurationLoader<org.spongepowered.configurate.CommentedConfigurationNode>
-
- org.spongepowered.configurate.hocon.HoconConfigurationLoader
-
- All Implemented Interfaces:
org.spongepowered.configurate.ConfigurationNodeFactory<org.spongepowered.configurate.CommentedConfigurationNode>
,org.spongepowered.configurate.loader.ConfigurationLoader<org.spongepowered.configurate.CommentedConfigurationNode>
public final class HoconConfigurationLoader extends org.spongepowered.configurate.loader.AbstractConfigurationLoader<org.spongepowered.configurate.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
.
-
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(org.spongepowered.configurate.ConfigurationNode node)
org.spongepowered.configurate.CommentedConfigurationNode
createNode(org.spongepowered.configurate.ConfigurationOptions options)
protected void
loadInternal(org.spongepowered.configurate.CommentedConfigurationNode node, BufferedReader reader)
protected void
saveInternal(org.spongepowered.configurate.ConfigurationNode node, Writer writer)
-
Methods inherited from class org.spongepowered.configurate.loader.AbstractConfigurationLoader
canLoad, canSave, defaultCommentHandler, defaultOptions, load, loadToReference, save, writeHeaderInternal
-
-
-
-
Method Detail
-
builder
public static HoconConfigurationLoader.Builder builder()
Creates a newHoconConfigurationLoader
builder.- Returns:
- a new builder
- Since:
- 4.0.0
-
checkCanWrite
protected void checkCanWrite(org.spongepowered.configurate.ConfigurationNode node) throws org.spongepowered.configurate.ConfigurateException
- Overrides:
checkCanWrite
in classorg.spongepowered.configurate.loader.AbstractConfigurationLoader<org.spongepowered.configurate.CommentedConfigurationNode>
- Throws:
org.spongepowered.configurate.ConfigurateException
-
loadInternal
protected void loadInternal(org.spongepowered.configurate.CommentedConfigurationNode node, BufferedReader reader) throws org.spongepowered.configurate.loader.ParsingException
- Specified by:
loadInternal
in classorg.spongepowered.configurate.loader.AbstractConfigurationLoader<org.spongepowered.configurate.CommentedConfigurationNode>
- Throws:
org.spongepowered.configurate.loader.ParsingException
-
saveInternal
protected void saveInternal(org.spongepowered.configurate.ConfigurationNode node, Writer writer) throws org.spongepowered.configurate.ConfigurateException
- Specified by:
saveInternal
in classorg.spongepowered.configurate.loader.AbstractConfigurationLoader<org.spongepowered.configurate.CommentedConfigurationNode>
- Throws:
org.spongepowered.configurate.ConfigurateException
-
createNode
public org.spongepowered.configurate.CommentedConfigurationNode createNode(org.spongepowered.configurate.ConfigurationOptions options)
-
-