Java Reference
In-Depth Information
types are included, otherwise they are excluded. A class level @serial
tag overrides a package level @serial tag.
The @serialField tag documents fields that are created by GetField and
PutField invocations, such as those in our Rectangle example. The tag
takes first the field name, then its type, and then a description. For ex-
ample:
/** @serialField x1 double X-coordinate of one corner. */
/** @serialField y1 double Y-coordinate of one corner. */
/** @serialField x2 double X-coordinate of other corner. */
/** @serialField y2 double Y-coordinate of other corner. */
private transient double x, y, width, height;
You use the @serialData tag in the doc comment for a writeObject
method to document any additional data written by the method. You can
also use @serialData to document anything written by an Externalizable
class's writeExternal method.
 
Search WWH ::




Custom Search