- java.lang.Object
-
- xyz.tozymc.configuration.memory.MemoryConfigSection
-
- xyz.tozymc.configuration.file.FileConfigSection
-
- xyz.tozymc.configuration.file.FileConfig
-
- xyz.tozymc.configuration.json.JsonConfig
-
- All Implemented Interfaces:
xyz.tozymc.configuration.DataStorage,xyz.tozymc.configuration.TcConfig,xyz.tozymc.configuration.TcConfigSection
public class JsonConfig extends xyz.tozymc.configuration.file.FileConfigType ofFileConfigthat is store and handle with.jsonfile format.- Since:
- 1.0
- See Also:
JsonConfigBuilder
-
-
Constructor Summary
Constructors Constructor Description JsonConfig(@NotNull Path path)Constructs newJsonConfigwith configuration file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull JsonConfigOptionsgetOptions()protected Map<String,?>readToMap()protected StringwriteToString()-
Methods inherited from class xyz.tozymc.configuration.file.FileConfig
getPath, reload, reloadIfNeeded, save
-
Methods inherited from class xyz.tozymc.configuration.file.FileConfigSection
createChild, createChild, getKeys, getOrDefault, getRoot, getValues, getValuesWithoutReload, newSection, set, setIfAbsent
-
Methods inherited from class xyz.tozymc.configuration.memory.MemoryConfigSection
get, get, getChild, getFullPath, getName, getOrDefault, getParent, hasChild, reloadSection
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface xyz.tozymc.configuration.DataStorage
compute, computeIfAbsent, computeIfPresent, contains, contains, find, find, get, get, getBoolean, getDouble, getDoubleList, getInt, getIntegerList, getKeys, getKeys, getList, getList, getLong, getMapList, getOrDefault, getOrDefault, getString, getStringList, getValues, isBoolean, isDouble, isInt, isList, isLong, isString, merge, remove, replace, set, setIfAbsent
-
-
-
-
Constructor Detail
-
JsonConfig
public JsonConfig(@NotNull @NotNull Path path)
Constructs newJsonConfigwith configuration file.- Parameters:
path- The configuration file
-
-
Method Detail
-
readToMap
protected Map<String,?> readToMap() throws IOException
- Specified by:
readToMapin classxyz.tozymc.configuration.file.FileConfig- Throws:
IOException
-
writeToString
protected String writeToString()
- Specified by:
writeToStringin classxyz.tozymc.configuration.file.FileConfig
-
getOptions
@NotNull public @NotNull JsonConfigOptions getOptions()
- Specified by:
getOptionsin interfacexyz.tozymc.configuration.TcConfig- Overrides:
getOptionsin classxyz.tozymc.configuration.file.FileConfig
-
-