Class TypeAdapter<T,S>
java.lang.Object
ca.spottedleaf.yamlconfig.adapter.TypeAdapter<T,S>
- Type Parameters:
T- The deserialized type of the objectS- The serialized type of the object
- Direct Known Subclasses:
BigDecimalTypeAdapter, BigIntegerTypeAdapter, BooleanTypeAdapter, ByteTypeAdapter, CollectionTypeAdapter, DefaultedTypeAdapter, DoubleTypeAdapter, EnumMapTypeAdapter, EnumSetTypeAdapter, FloatTypeAdapter, IntegerTypeAdapter, ListTypeAdapter, LongTypeAdapter, MapTypeAdapter, SetTypeAdapter, ShortTypeAdapter, StringEnumTypeAdapter, StringFormTypeAdapter, StringTypeAdapter
Class which defines serialization to and from YAML.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Tdeserialize(TypeAdapterRegistry registry, Object input, Type type) Deserializes the value from YAML.abstract Sserialize(TypeAdapterRegistry registry, T value, Type type) Serializes the value to YAML.
-
Constructor Details
-
TypeAdapter
public TypeAdapter()
-
-
Method Details
-
deserialize
Deserializes the value from YAML.- Parameters:
registry- The type adapter registry context.input- The object from YAML.type- The type information associated with the deserialized object.- Returns:
- The deserialized form of the object.
-
serialize
Serializes the value to YAML.- Parameters:
registry- The type adapter registry context.value- The deserialized form of the object.type- The type information associated with the deserialized object.- Returns:
- The serialized form of the object.
-