package x;

import java.awt.event.InvocationEvent;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;

/**
 * This is needed to catch the previously deserialized
 * event for later usage.
 */
public class InvocationEventHolder implements Serializable {

    private static final long serialVersionUID = -3609966585057367355L;

    static InvocationEventHolder lastInstance;

    public InvocationEventHolder(InvocationEvent object) {
        super();
        this.object = object;
    }

    InvocationEvent object;

    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
        in.defaultReadObject();
        lastInstance = this;
    }

}
