public interface ConfigurationLoader<NodeType extends ConfigurationNode>
| Modifier and Type | Method and Description |
|---|---|
default NodeType |
createEmptyNode()
Return an empty node of the most appropriate type for this loader, using the default options.
|
NodeType |
createEmptyNode(ConfigurationOptions options)
Return an empty node of the most appropriate type for this loader
|
ConfigurationOptions |
getDefaultOptions()
Get the default options that any new nodes will be created with if no options object is passed.
|
default 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 this loader.
|
ConfigurationOptions getDefaultOptions()
default 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 configurationdefault NodeType createEmptyNode()
NodeType createEmptyNode(ConfigurationOptions options)
options - The options to use with this node. Must not be null (take a look at ConfigurationOptions.defaults())Copyright © 2014–2017. All rights reserved.