Class XmlConfigurationLoader
- java.lang.Object
-
- org.spongepowered.configurate.loader.AbstractConfigurationLoader<AttributedConfigurationNode>
-
- org.spongepowered.configurate.xml.XmlConfigurationLoader
-
- All Implemented Interfaces:
ConfigurationNodeFactory<AttributedConfigurationNode>
,ConfigurationLoader<AttributedConfigurationNode>
public final class XmlConfigurationLoader extends AbstractConfigurationLoader<AttributedConfigurationNode>
A loader for XML (Extensible Markup Language), using the native javax library for parsing and generation.- Since:
- 4.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XmlConfigurationLoader.Builder
Builds aXmlConfigurationLoader
.
-
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 @NonNull XmlConfigurationLoader.Builder
builder()
Creates a newXmlConfigurationLoader
builder.AttributedConfigurationNode
createNode(ConfigurationOptions options)
@NonNull AttributedConfigurationNode
load(@NonNull ConfigurationOptions options)
protected void
loadInternal(AttributedConfigurationNode node, java.io.BufferedReader reader)
protected void
saveInternal(ConfigurationNode node, java.io.Writer writer)
protected void
writeHeaderInternal(java.io.Writer writer)
-
Methods inherited from class org.spongepowered.configurate.loader.AbstractConfigurationLoader
canLoad, canSave, checkCanWrite, defaultCommentHandler, defaultOptions, loadToReference, save
-
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 @NonNull XmlConfigurationLoader.Builder builder()
Creates a newXmlConfigurationLoader
builder.- Returns:
- a new builder
- Since:
- 4.0.0
-
load
public @NonNull AttributedConfigurationNode load(@NonNull ConfigurationOptions options) throws ParsingException
- Specified by:
load
in interfaceConfigurationLoader<AttributedConfigurationNode>
- Overrides:
load
in classAbstractConfigurationLoader<AttributedConfigurationNode>
- Throws:
ParsingException
-
loadInternal
protected void loadInternal(AttributedConfigurationNode node, java.io.BufferedReader reader)
- Specified by:
loadInternal
in classAbstractConfigurationLoader<AttributedConfigurationNode>
-
writeHeaderInternal
protected void writeHeaderInternal(java.io.Writer writer) throws java.io.IOException
- Overrides:
writeHeaderInternal
in classAbstractConfigurationLoader<AttributedConfigurationNode>
- Throws:
java.io.IOException
-
saveInternal
protected void saveInternal(ConfigurationNode node, java.io.Writer writer) throws ConfigurateException
- Specified by:
saveInternal
in classAbstractConfigurationLoader<AttributedConfigurationNode>
- Throws:
ConfigurateException
-
createNode
public AttributedConfigurationNode createNode(ConfigurationOptions options)
-
-