Class 
Use 
SUMMARY: REQUIRED | OPTIONAL      DETAIL: ELEMENT
FlexDoc/Javadoc 2.0
Demo Java Doc

java.base / java.io
Annotation Type Serial

@Retention(SOURCE)
public @interface Serial
Indicates that an annotated field or method is part of the serialization mechanism defined by the Java Object Serialization Specification. This annotation type is intended to allow compile-time checking of serialization-related declarations, analogous to the checking enabled by the Override annotation type to validate method overriding. Serializable classes are encouraged to use @Serial annotations to help a compiler catch mis-declared serialization-related fields and methods, mis-declarations that may otherwise be difficult to detect.

Specifically, annotations of this type should be applied to serialization-related methods and fields in classes declared to be Serializable. The five serialization-related methods are:

The two serialization-related fields are: Compilers are encouraged to validate that a method or field marked with a @Serial annotation is one of the defined serialization-related methods or fields declared in a meaningful context and issue a warning if that is not the case.

It is a semantic error to apply this annotation to other fields or methods, including:

Note that serialization mechanism accesses its designated fields and methods reflectively and those fields and methods may appear otherwise unused in a Serializable class.
Since:
14
See Also:
Serializable, Externalizable

 Class 
Use 
SUMMARY: REQUIRED | OPTIONAL      DETAIL: ELEMENT
FlexDoc/Javadoc 2.0
Demo Java Doc

Java API documentation generated with FlexDoc/Javadoc 2.0 using JavadocClassic 3.0 template set.
FlexDoc/Javadoc is a template-driven programming tool for rapid development of any Javadoc-based Java API documentation generators (i.e. doclets). If you need to customize your Javadoc without writing a full-blown doclet from scratch, FlexDoc/Javadoc may be the only tool able to help you! Find out more at www.flexdoc.xyz