/* Authors: Alexander Elyasov, Arie Middelkoop Copyright 2011 Utrecht University The use of this sofware is free under the Modified BSD License. */ package UU.ISerialization { // An instance of Serializer is passed to each object's specific serialization method. // The responsibility of the serializer is to store the values passed to it. The // responsibility of the Serializable object is to specify what needs to be stored. public interface Serializer { // Tells the serializer that we start with serializing a certain object. function beginObject(obj : Object, objType : String) : void; // Tells the serializer that we stopped serializing the object. // Calls to beginObject and endObject may be nested, but must be balanced. function endObject() : void; // Stores the field of the object mentioned by the latest 'beginObject'. function storeField(name : QName, val : Object) : void; // Should be called after the seralization of an object graph. function reset() : void; // To serialize an arbitrary object. This implies that the object may not // implement Serializable. function serialize(obj : Object) : void ; } }