package serialize { // 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; } }