Interface ConfigSerializer<T>
- Type Parameters:
T
- The type of object this serializer handles
- All Known Implementing Classes:
ItemActionSerializer
,ItemCraftingRecipeSerializer
,ItemStackSerializer
,LocationSerializer
,Point2dSerializer
,Polygon3dSerializer
public interface ConfigSerializer<T>
Interface for serializing and deserializing objects to and from configuration sections.
Implementations of this interface can be registered with the configuration system
to handle complex types.
- Since:
- 1.0.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(SectionWrapper section, String path) Deserialize an object from a configuration section.default <S> ConfigSerializer
<S> getSerializer
(Class<S> type) getType()
Get the type of object this serializer handles.default void
void
Serialize an object to a configuration section.
-
Method Details
-
serialize
Serialize an object to a configuration section.- Parameters:
args
- The serialization arguments
-
deserialize
Deserialize an object from a configuration section.- Parameters:
section
- The configuration section to deserialize frompath
- The path within the section to deserialize from- Returns:
- The deserialized object
-
getType
Get the type of object this serializer handles.- Returns:
- The class of the object type
-
getSerializer
-
save
-