"Aaron M. Renn" <[EMAIL PROTECTED]> writes:
> A question about serialization. Do we have to make any instance variables
> that aren't supposed to be serialized in the spec as transiet or something?
> If we don't have to do that, we need to document which variables are
> serialized in our code. This keeps people from changing their names or
> eliminating them during optimization or something. I was thinking we could
> use a Javadoc like "@serialized" tag to indicate these. That would also
> facilitate extracting the comments for them out and creating our own
> "Serialized Form" document. If we do have to make everything not serialized
> as transient, then we don't need to do any of that.
>
> Comments?
If the class implements Serializable, then either the usual variables
are serialized via the default method or we have to write our own
method. In cases where the variable names disagree (read just about
everywhere) then we also have to do a readObject/writeObject method
and appropriately write out the correct fields with the correct names
and whatnot.
Basically make sure the classes conform to the spec published in 1.2
where Sun has provided information in whatever way makes sense. As
for doc comments, I don't know, I was hoping it was more or less
automatic, but there may be a new tag.
Brian
--
|-------------------------------|Software Engineer
|Brian Jones |[EMAIL PROTECTED]
|[EMAIL PROTECTED] |http://www.nortel.net
|http://www.classpath.org/ |------------------------------