C - The type of the config instanceT - The type to serializepublic abstract class ConfigTypeSerializer<C,T>
extends java.lang.Object
| Constructor and Description |
|---|
ConfigTypeSerializer(C config) |
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(java.lang.Class<T> typeClass,
java.lang.Object serializedObject)
Deserializes the given yaml object to the type
T. |
T |
deserialize(java.lang.Class<T> typeClass,
T currentValue,
java.lang.Object serializedObject)
Deserializes the given yaml object to the type
T. |
T |
deserialize(java.lang.Object serializedObject)
Deserializes the given yaml object to the type
T. |
T |
deserialize(TypeSerializerList<C> typeSerializers,
java.lang.Class<T> typeClass,
T currentValue,
java.lang.Object serializedObject)
Deserializes the given yaml object to the type
T. |
java.lang.Object |
serialize(java.lang.Class<T> typeClass,
T object)
Serializes the given object to a yaml object.
|
java.lang.Object |
serialize(T object)
Serializes the given object to a yaml object.
|
java.lang.Object |
serialize(TypeSerializerList<C> typeSerializers,
java.lang.Class<T> typeClass,
T object)
Serializes the given object to a yaml object.
|
protected final C config
public ConfigTypeSerializer(C config)
public T deserialize(java.lang.Object serializedObject)
T.Tag for the possible types.serializedObject - The object to deserializepublic T deserialize(java.lang.Class<T> typeClass, java.lang.Object serializedObject)
T.Tag for the possible types.typeClass - The class of the type to deserializeserializedObject - The object to deserializepublic T deserialize(java.lang.Class<T> typeClass, T currentValue, java.lang.Object serializedObject)
T.Tag for the possible types.typeClass - The class of the type to deserializecurrentValue - The last value of the option (default value on load, last value on reload)serializedObject - The object to deserializepublic T deserialize(TypeSerializerList<C> typeSerializers, java.lang.Class<T> typeClass, T currentValue, java.lang.Object serializedObject)
T.Tag for the possible types.typeSerializers - The list of all type serializerstypeClass - The class of the type to deserializecurrentValue - The last value of the option (default value on load, last value on reload)serializedObject - The object to deserializepublic java.lang.Object serialize(T object)
Tag for the possible types.object - The object to serializepublic java.lang.Object serialize(java.lang.Class<T> typeClass, T object)
Tag for the possible types.typeClass - The class of the type to serializeobject - The object to serializepublic java.lang.Object serialize(TypeSerializerList<C> typeSerializers, java.lang.Class<T> typeClass, T object)
Tag for the possible types.typeSerializers - The list of all type serializerstypeClass - The class of the type to serializeobject - The object to serialize