|
223 | 223 | * Similarly, any serialPersistentFields or serialVersionUID field declarations |
224 | 224 | * are also ignored--all enum types have a fixed serialVersionUID of 0L. |
225 | 225 | * |
226 | | - * @implSpec |
227 | 226 | * <a id="record-serialization"></a> |
228 | | - * Records are serialized differently than ordinary serializable or externalizable |
229 | | - * objects. The serialized form of a record object is a sequence of values derived |
230 | | - * from the record components. The stream format of a record object is the same as |
231 | | - * that of an ordinary object in the stream. During deserialization, if the local |
232 | | - * class equivalent of the specified stream class descriptor is a record class, |
233 | | - * then first the stream fields are read and reconstructed to serve as the record's |
234 | | - * component values; and second, a record object is created by invoking the |
235 | | - * record's <i>canonical</i> constructor with the component values as arguments (or the |
236 | | - * default value for component's type if a component value is absent from the |
237 | | - * stream). |
238 | | - * Like other serializable or externalizable objects, record objects can function |
239 | | - * as the target of back references appearing subsequently in the serialization |
240 | | - * stream. However, a cycle in the graph where the record object is referred to, |
241 | | - * either directly or transitively, by one of its components, is not preserved. |
242 | | - * The record components are deserialized prior to the invocation of the record |
243 | | - * constructor, hence this limitation (see |
244 | | - * <a href="{@docRoot}/../specs/serialization/serial-arch.html#cyclic-references"> |
245 | | - * <cite>Java Object Serialization Specification,</cite> |
246 | | - * Section 1.14, "Circular References"</a> for additional information). |
247 | | - * The process by which record objects are serialized or externalized cannot be |
248 | | - * customized; any class-specific writeObject, readObject, readObjectNoData, |
249 | | - * writeExternal, and readExternal methods defined by record classes are |
250 | | - * ignored during serialization and deserialization. However, a substitute object |
251 | | - * to be serialized or a designate replacement may be specified, by the |
252 | | - * writeReplace and readResolve methods, respectively. Any |
253 | | - * serialPersistentFields field declaration is ignored. Documenting serializable |
254 | | - * fields and data for record classes is unnecessary, since there is no variation |
255 | | - * in the serial form, other than whether a substitute or replacement object is |
256 | | - * used. The serialVersionUID of a record class is 0L unless explicitly |
257 | | - * declared. The requirement for matching serialVersionUID values is waived for |
258 | | - * record classes. |
| 227 | + * <p>Records are serialized differently than ordinary serializable or externalizable |
| 228 | + * objects. During deserialization the record's canonical constructor is invoked |
| 229 | + * to construct the record object. Certain serialization-related methods, such |
| 230 | + * as readObject and writeObject, are ignored for serializable records. See |
| 231 | + * <a href="{@docRoot}/../specs/serialization/serial-arch.html#serialization-of-records"> |
| 232 | + * <cite>Java Object Serialization Specification,</cite> Section 1.13, |
| 233 | + * "Serialization of Records"</a> for additional information. |
259 | 234 | * |
260 | 235 | * @author Mike Warres |
261 | 236 | * @author Roger Riggs |
|
0 commit comments