Class AbstractConfigurationFormat<N extends ScopedConfigurationNode<N>,L extends AbstractConfigurationLoader<N>,B extends AbstractConfigurationLoader.Builder<B,L>>   
java.lang.Object
org.spongepowered.configurate.loader.AbstractConfigurationFormat<N,L,B>  
- Type Parameters:
- N- the node type
- L- the loader type
- B- the builder type
- All Implemented Interfaces:
- ConfigurationFormat
- Direct Known Subclasses:
- GsonConfigurationFormat,- HoconConfigurationFormat,- JacksonConfigurationFormat,- XmlConfigurationFormat,- YamlConfigurationFormat
public abstract class AbstractConfigurationFormat<N extends ScopedConfigurationNode<N>,L extends AbstractConfigurationLoader<N>,B extends AbstractConfigurationLoader.Builder<B,L>>   
extends Object
implements ConfigurationFormat
An implementation of 
ConfigurationFormat designed to work
 with AbstractConfigurationLoader.
 This reduces the boilerplate that would otherwise be required to implement a configuration format service.
- Since:
- 4.2.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionConfigurationLoader<? extends @NonNull Object>Create a new loader configured to load from the provided URL, with default style options.ConfigurationLoader<? extends @NonNull Object>create(URL url, ConfigurationNode options) Create a new loader configured to load from the provided URL.ConfigurationLoader<? extends @NonNull Object>Create a new loader configured to load from the provided file, with default style options.ConfigurationLoader<? extends @NonNull Object>create(Path file, ConfigurationNode options) Create a new loader configured to load from the provided file.id()An identifier describing this loader.Get the file extensions known to be supported by this format.
- 
Constructor Details- 
AbstractConfigurationFormatprotected AbstractConfigurationFormat(String id, Supplier<B> builderMaker, Set<String> supportedExtensions) Create a new configuration format.Subclasses should have a zero-argument constructor to fulfil the requirements of ServiceLoader.- Parameters:
- builderMaker- a factory creating a new builder
- supportedExtensions- the file extensions associated with this format
- Since:
- 4.2.0
 
 
- 
- 
Method Details- 
idDescription copied from interface:ConfigurationFormatAn identifier describing this loader.This should match the naming used in other locations, such as the loader's artifact ID or class name. - Specified by:
- idin interface- ConfigurationFormat
- Returns:
- the loader identifier
 
- 
supportedExtensionsDescription copied from interface:ConfigurationFormatGet the file extensions known to be supported by this format.- Specified by:
- supportedExtensionsin interface- ConfigurationFormat
- Returns:
- the supported extensions
 
- 
createDescription copied from interface:ConfigurationFormatCreate a new loader configured to load from the provided file, with default style options.- Specified by:
- createin interface- ConfigurationFormat
- Parameters:
- file- the file to load from
- Returns:
- a newly configured loader
 
- 
createDescription copied from interface:ConfigurationFormatCreate a new loader configured to load from the provided file.- Specified by:
- createin interface- ConfigurationFormat
- Parameters:
- file- the file to load from
- options- the options to use to configure the node
- Returns:
- a newly configured loader
 
- 
createDescription copied from interface:ConfigurationFormatCreate a new loader configured to load from the provided URL, with default style options.This loader may not be able to write to the given URL - Specified by:
- createin interface- ConfigurationFormat
- Parameters:
- url- the URL to load from
- Returns:
- a newly configured loader
 
- 
createDescription copied from interface:ConfigurationFormatCreate a new loader configured to load from the provided URL.This loader may not be able to write to the given URL. - Specified by:
- createin interface- ConfigurationFormat
- Parameters:
- url- the URL to load from
- options- the options to use to configure the node
- Returns:
- a newly configured loader
 
 
-