diff options
Diffstat (limited to 'libjava/java/io/ObjectInputValidation.java')
-rw-r--r-- | libjava/java/io/ObjectInputValidation.java | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/libjava/java/io/ObjectInputValidation.java b/libjava/java/io/ObjectInputValidation.java index 2259eb8..af9da5f 100644 --- a/libjava/java/io/ObjectInputValidation.java +++ b/libjava/java/io/ObjectInputValidation.java @@ -39,16 +39,27 @@ exception statement from your version. */ package java.io; /** - * What does this interface really do? + * This class allows an object to validate that it is valid after + * deserialization has run completely for it and all dependent objects. + * This allows an object to determine if it is invalid even if all + * state data was correctly deserialized from the stream. It can also + * be used to perform re-initialization type activities on an object + * after it has been completely deserialized. + * + * Since this method functions as a type of callback, it must be + * registered through <code>ObjectInputStream.registerValidation</code> + * in order to be invoked. This is typically done in the + * <code>readObject</code> method. * * @author Aaron M. Renn (arenn@urbanophile.com) + * + * @see ObjectInputStream#registerValidation */ public interface ObjectInputValidation { - /** - * This method is called to validate an object. If the object is invalid - * an exception is thrown. + * This method is called to validate an object after serialization + * is complete. If the object is invalid an exception is thrown. * * @exception InvalidObjectException If the object is invalid */ |