Interface ConfigurationLoader<N extends ConfigurationNode>
- Type Parameters:
- N- the- ConfigurationNodetype produced by the loader
- All Superinterfaces:
- ConfigurationNodeFactory<N>
- All Known Implementing Classes:
- AbstractConfigurationLoader,- GsonConfigurationLoader,- HoconConfigurationLoader,- JacksonConfigurationLoader,- XmlConfigurationLoader,- YamlConfigurationLoader
public interface ConfigurationLoader<N extends ConfigurationNode>
extends ConfigurationNodeFactory<N>
Represents an object which can load and save 
ConfigurationNode objects in a specific
 configuration format.
 An abstract implementation is provided by AbstractConfigurationLoader.
- Since:
- 4.0.0
- 
Method SummaryModifier and TypeMethodDescriptiondefault booleancanLoad()Gets if this loader is capable of loading configurations.default booleancanSave()Gets if this loader is capable of saving configurations.default Nload()Attempts to load aConfigurationNodeusing this loader, from the defined source.load(ConfigurationOptions options) Attempts to load aConfigurationNodeusing this loader, from the defined source.Attempts to load data from the defined source into aConfigurationReference.voidsave(ConfigurationNode node) Attempts to save aConfigurationNodeusing this loader, to the defined sink.Methods inherited from interface org.spongepowered.configurate.ConfigurationNodeFactorycreateNode, createNode, createNode, createNode, defaultOptions, toListCollector, toListCollector, toMapCollector, toMapCollector
- 
Method Details- 
loadAttempts to load aConfigurationNodeusing this loader, from the defined source.The resultant node represents the root of the configuration being loaded. The default optionswill be used to construct the resultant configuration nodes.- Returns:
- the newly constructed node
- Throws:
- ConfigurateException- if any sort of error occurs with reading or parsing the configuration
- Since:
- 4.0.0
 
- 
loadAttempts to load aConfigurationNodeusing this loader, from the defined source.The resultant node represents the root of the configuration being loaded. - Parameters:
- options- the options to load with
- Returns:
- the newly constructed node
- Throws:
- ConfigurateException- if any sort of error occurs with reading or parsing the configuration
- Since:
- 4.0.0
 
- 
loadToReferenceAttempts to load data from the defined source into aConfigurationReference. The returned reference will not reload automatically.- Returns:
- the created reference
- Throws:
- ConfigurateException- when an error occurs within the loader
- Since:
- 4.0.0
- See Also:
 
- 
saveAttempts to save aConfigurationNodeusing this loader, to the defined sink.- Parameters:
- node- the node to save
- Throws:
- ConfigurateException- if any sort of error occurs with writing or generating the configuration
- Since:
- 4.0.0
 
- 
canLoadGets if this loader is capable of loading configurations.- Returns:
- if this loader can load
- Since:
- 4.0.0
 
- 
canSaveGets if this loader is capable of saving configurations.- Returns:
- if this loader can save
- Since:
- 4.0.0
 
 
-