Package pro.gravit.launcher.config
Interface JsonConfigurableInterface<T>
-
- All Known Implementing Classes:
JsonConfigurable,SimpleConfig,SimpleConfigurable
public interface JsonConfigurableInterface<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleangenerateConfigIfNotExists()default booleangenerateConfigIfNotExists(java.nio.file.Path path)TgetConfig()TgetDefaultConfig()java.nio.file.PathgetPath()java.lang.reflect.TypegetType()default voidloadConfig()default voidloadConfig(com.google.gson.Gson gson, java.nio.file.Path configPath)default voidloadConfig(java.nio.file.Path configPath)default voidresetConfig()default voidresetConfig(java.nio.file.Path newPath)default voidsaveConfig()default voidsaveConfig(com.google.gson.Gson gson, java.nio.file.Path configPath)default voidsaveConfig(java.nio.file.Path configPath)voidsetConfig(T config)default java.lang.StringtoJsonString()default java.lang.StringtoJsonString(com.google.gson.Gson gson)
-
-
-
Method Detail
-
saveConfig
default void saveConfig() throws java.io.IOException- Throws:
java.io.IOException
-
loadConfig
default void loadConfig() throws java.io.IOException- Throws:
java.io.IOException
-
saveConfig
default void saveConfig(com.google.gson.Gson gson, java.nio.file.Path configPath) throws java.io.IOException- Throws:
java.io.IOException
-
toJsonString
default java.lang.String toJsonString(com.google.gson.Gson gson)
-
toJsonString
default java.lang.String toJsonString()
-
loadConfig
default void loadConfig(com.google.gson.Gson gson, java.nio.file.Path configPath) throws java.io.IOException- Throws:
java.io.IOException
-
saveConfig
default void saveConfig(java.nio.file.Path configPath) throws java.io.IOException- Throws:
java.io.IOException
-
loadConfig
default void loadConfig(java.nio.file.Path configPath) throws java.io.IOException- Throws:
java.io.IOException
-
resetConfig
default void resetConfig() throws java.io.IOException- Throws:
java.io.IOException
-
resetConfig
default void resetConfig(java.nio.file.Path newPath) throws java.io.IOException- Throws:
java.io.IOException
-
generateConfigIfNotExists
default boolean generateConfigIfNotExists(java.nio.file.Path path) throws java.io.IOException- Throws:
java.io.IOException
-
generateConfigIfNotExists
default boolean generateConfigIfNotExists() throws java.io.IOException- Throws:
java.io.IOException
-
getConfig
T getConfig()
-
setConfig
void setConfig(T config)
-
getDefaultConfig
T getDefaultConfig()
-
getPath
java.nio.file.Path getPath()
-
getType
java.lang.reflect.Type getType()
-
-