public interface ConfigurationLoader<NodeType extends ConfigurationNode>
Modifier and Type | Method and Description |
---|---|
NodeType |
createEmptyNode(ConfigurationOptions options)
Return an empty node of the most appropriate type for this loader
|
NodeType |
load()
Create a new configuration node populated with the appropriate data
|
NodeType |
load(ConfigurationOptions options)
Create a new configuration node populated with the appropriate data, structured with the provided options
|
void |
save(ConfigurationNode node)
Save the contents of the given node tree to
|
NodeType load() throws IOException
IOException
- if any sort of error occurs with reading or parsing the configurationNodeType load(ConfigurationOptions options) throws IOException
options
- The options to load withIOException
- if any sort of error occurs with reading or parsing the configurationvoid save(ConfigurationNode node) throws IOException
node
- The node a save is being requested forIOException
- if any sort of error occurs with writing or generating the configurationNodeType createEmptyNode(ConfigurationOptions options)
options
- The options to use with this node. Must not be null (take a look at ConfigurationOptions.defaults()
)Copyright © 2014–2015 Leaping Ninja. All rights reserved.