T - The type of the configpublic class DefaultConfigSerializer<T extends IConfig<T>> extends java.lang.Object implements ConfigSerializer<T>
| Constructor and Description |
|---|
DefaultConfigSerializer(java.lang.Class<T> configClass,
java.io.File file,
java.util.function.Supplier<T> defaultConfig)
Creates a serializer.
|
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize()
Reads the config from the file.
|
void |
serialize(T config)
Serializes the config.
|
public T deserialize()
deserialize in interface ConfigSerializer<T extends IConfig<T>>public void serialize(T config)
ConfigSerializerserialize in interface ConfigSerializer<T extends IConfig<T>>config - The config to be serialized.