net.md_5.config.ConfigurationProvider Maven / Gradle / Ivy
package net.md_5.config;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
public abstract class ConfigurationProvider {
private static final Map, ConfigurationProvider> providers = new HashMap<>();
static {
providers.put(YamlConfiguration.class, new YamlConfiguration());
}
public static ConfigurationProvider getProvider(
Class extends ConfigurationProvider> provider) {
return providers.get(provider);
}
/*------------------------------------------------------------------------*/
public abstract void save(Configuration config, File file) throws IOException;
public abstract void save(Configuration config, Writer writer);
public abstract Configuration load(File file) throws IOException;
public abstract Configuration load(File file, Configuration defaults) throws IOException;
public abstract Configuration load(Reader reader);
public abstract Configuration load(Reader reader, Configuration defaults);
public abstract Configuration load(InputStream is);
public abstract Configuration load(InputStream is, Configuration defaults);
public abstract Configuration load(String string);
public abstract Configuration load(String string, Configuration defaults);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy