Interface TypeSerializer.Annotated<V>
- Type Parameters:
- V- the value type
- All Superinterfaces:
- TypeSerializer<V>
- All Known Implementing Classes:
- AbstractListChildSerializer,- ScalarSerializer,- ScalarSerializer.Annotated
- Enclosing interface:
- TypeSerializer<T>
A type serializer that prefers type use annotation metadata to
 deserialize the type.
- Since:
- 4.2.0
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.spongepowered.configurate.serialize.TypeSerializerTypeSerializer.Annotated<V>
- 
Method SummaryModifier and TypeMethodDescriptiondeserialize(AnnotatedType type, ConfigurationNode node) Deserialize an object (of the correct type) from the given configuration node.default Vdeserialize(Type type, ConfigurationNode node) Deserialize an object (of the correct type) from the given configuration node.default @Nullable VemptyValue(AnnotatedType specificType, ConfigurationOptions options) Create an empty value of the appropriate type.default @Nullable VemptyValue(Type specificType, ConfigurationOptions options) Create an empty value of the appropriate type.voidserialize(AnnotatedType type, @Nullable V obj, ConfigurationNode node) Serialize an object to the given configuration node.default voidserialize(Type type, @Nullable V obj, ConfigurationNode node) Serialize an object to the given configuration node.
- 
Method Details- 
deserializeDescription copied from interface:TypeSerializerDeserialize an object (of the correct type) from the given configuration node.- Specified by:
- deserializein interface- TypeSerializer<V>
- Parameters:
- type- the annotated type of return value required
- node- the node containing serialized data
- Returns:
- an object
- Throws:
- SerializationException- if the presented data is invalid
 
- 
deserializeDescription copied from interface:TypeSerializerDeserialize an object (of the correct type) from the given configuration node.- Specified by:
- deserializein interface- TypeSerializer<V>
- Parameters:
- type- the type of return value required
- node- the node containing serialized data
- Returns:
- an object
- Throws:
- SerializationException- if the presented data is invalid
 
- 
serializevoid serialize(AnnotatedType type, @Nullable V obj, ConfigurationNode node) throws SerializationException Description copied from interface:TypeSerializerSerialize an object to the given configuration node.- Specified by:
- serializein interface- TypeSerializer<V>
- Parameters:
- type- the annotated type of the input object
- obj- the object to be serialized
- node- the node to write to
- Throws:
- SerializationException- if the object cannot be serialized
 
- 
serializedefault void serialize(Type type, @Nullable V obj, ConfigurationNode node) throws SerializationException Description copied from interface:TypeSerializerSerialize an object to the given configuration node.- Specified by:
- serializein interface- TypeSerializer<V>
- Parameters:
- type- the type of the input object
- obj- the object to be serialized
- node- the node to write to
- Throws:
- SerializationException- if the object cannot be serialized
 
- 
emptyValueDescription copied from interface:TypeSerializerCreate an empty value of the appropriate type.This method is for the most part designed to create empty collection types, though it may be useful for scalars in limited cases. - Specified by:
- emptyValuein interface- TypeSerializer<V>
- Parameters:
- specificType- specific annotated subtype to create an empty value of
- options- options used from the loading node
- Returns:
- new empty value
 
- 
emptyValueDescription copied from interface:TypeSerializerCreate an empty value of the appropriate type.This method is for the most part designed to create empty collection types, though it may be useful for scalars in limited cases. - Specified by:
- emptyValuein interface- TypeSerializer<V>
- Parameters:
- specificType- specific subtype to create an empty value of
- options- options used from the loading node
- Returns:
- new empty value
 
 
-