Serializer
class that enables:
Serializable
ClassSerializable
class with these key methods:
Method | Purpose |
---|---|
createSnapshot() | Captures the current state |
loadSnapshot(snapshot) | Applies a snapshot to the current instance |
fromSnapshot(snapshot) | Creates a new instance from a snapshot (static) |
fromSerialized(data) | Creates a new instance from serialized data (static) |
Serializable
.Serializer
does not know, you may register it using one of the following options.
1. Register External Classes
You can register external classes with the serializer:
Serializable
Interface
For deeper integration, extend the Serializable class:
Serializer
does not know will result in the SerializerError
error. BeeAI framework avoids importing all potential classes automatically to prevent increased application size and unnecessary dependencies.