
com.electronwill.nightconfig.hocon.HoconFormat Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hocon Show documentation
Show all versions of hocon Show documentation
Powerful, easy-to-use and multi-language configuration library for the JVM - hocon module
package com.electronwill.nightconfig.hocon;
import com.electronwill.nightconfig.core.CommentedConfig;
import com.electronwill.nightconfig.core.ConfigFormat;
import com.electronwill.nightconfig.core.file.FormatDetector;
import com.electronwill.nightconfig.core.io.ConfigParser;
import com.electronwill.nightconfig.core.io.ConfigWriter;
import java.util.Map;
import java.util.function.Supplier;
/**
* Represents the Hocon config format.
*
* @author TheElectronWill
*/
public final class HoconFormat implements ConfigFormat {
private static final HoconFormat INSTANCE = new HoconFormat();
/**
* @return the unique instance of HoconFormat
*/
public static HoconFormat instance() {
return INSTANCE;
}
/**
* @return a new config with the hocon format
*/
public static CommentedConfig newConfig() {
return INSTANCE.createConfig();
}
/**
* @return a new config with the given map creator
*/
public static CommentedConfig newConfig(Supplier
© 2015 - 2025 Weber Informatics LLC | Privacy Policy