serializable annotation

The serializable annotation is applied to a class to denote that it should be able to externalize its state. Ultimately the serializability of an instance is also dependent on the serialization library being used.


serializable class Foo() {}


The serializable annotation causes the compiler to generate extra hidden code which allows the instances state (including non-shared state) to be externalized to a Deconstructor, and to initialize an instance from a Deconstructed.

See also