Java Reference
In-Depth Information
The following is an example of how to use different forms of the
@see
tag. It assumes that
Calc
class is in the same
package as the
Dummy
class and the
Calc
class contains
add()
and
multiply()
methods.
package com.jdojo.utility;
/**
* A dummy class.
*
* @see "Online Java Tutorial"
* @see <a href="
http://www.oracle.com
"
>Oracle Website</a>
* @see com.jdojo.utility.Calc Calculator
* @see com.jdojo.utility.Calc#add(int, int) Add Method
* @see com.jdojo.utility.Calc#multiply(int, int)
*/
public class Dummy {
}
The generated See Also section for the
Dummy
class would look as shown:
See Also:
"Online Java Tutorial" Oracle Website, Calculator
,
Add Method
,
Calc.multiply(int, int)
@serial <field-description or include/exclude>
The
javadoc
tool generates a Serialized Form page that contains all pieces of information about serialized forms of all
serialized classes. The tool creates a See Also section for serialized classes that contains a link to the Serialized Form
page. A class needs to implement
java.io.Serializable
or
java.io.Externalizable
interface to be added to the
Serialized Form page.
The
@serial
tag is used to add a description for default serializable fields of a class. The specified description will
be added to the Serialized Form page for the field. The following is an example of using the
@serial
tag for a field:
/**
* A dummy class.
*/
public class Dummy implements java.io.Serializable {
/**
* @serial The description for value field goes here
*/
private int value;
}