home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-20 | 1.2 KB | 39 lines |
- /*
- * @(#)Replaceable.java 1.6 98/03/18
- *
- * Copyright 1997 by Sun Microsystems, Inc.,
- * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
- * All rights reserved.
- *
- * This software is the confidential and proprietary information
- * of Sun Microsystems, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Sun.
- */
-
- package java.io;
-
- /**
- * The Replaceable interface allows a serializable class to designate
- * an alternative object to be used when the object is written to
- * the stream.
- *
- * Replaceable extends serializable to specify that Replaceable applies
- * only to Serializable objects. An Externalizable object uses the
- * same replacement mechanism by implementing both Externalizable and
- * Replaceable.
- *
- * @author Roger Riggs
- * @version * @(#)Replaceable.java 1.6 98/03/18
- * @see java.io.ObjectOutputStream
- * @since JDK1.2
- */
- public interface Replaceable extends Serializable {
- /**
- * Return an object to be written to the stream instead of
- * this object.
- */
- Object writeReplace();
- }
-