Class JavadocExample

java.lang.Object
   |
   +----JavadocExample

public class JavadocExample
extends Object
The class JavadocExample gives an example of how to document a class definition using the conventions of the Java Documentation tool, javadoc. This summary of the class gets printed at the beginning of the .html page for the class.

Javadoc documentation starts with a Java comment of the form
/**
--- just way that a normal comment begins except that both **'s are needed. The comment is ended with the normal end of comment, namely, a slash followed by a *.

The javadoc comments may have embedded html tags.

javadoc produces documentation for any public or protected class, member variable, or method. Comments for other items do not appear in the javadoc output. For more details on use of javadoc, see Appendix B of the Java 1.1 Developer's Handbook.


Variable Index

 o className
Here is a protected static class variable.
 o memberVar
Member variables can be documented

Constructor Index

 o JavadocExample()
Constructors are handled specially by javadoc.

Method Index

 o foo(int)
Documentation of a member method that returns the value of the attribute of the object.

Variables

 o memberVar
 protected int memberVar
Member variables can be documented

 o className
 protected static String className
Here is a protected static class variable.

Constructors

 o JavadocExample
 public JavadocExample()
Constructors are handled specially by javadoc. Here is a zero-param constructor that initializes memberVar to zero.

Methods

 o foo
 public String foo(int A) throws IllegalAccessException
Documentation of a member method that returns the value of the attribute of the object. The result is returned as a String. The see tag as used below can be used for cross-references to other classes, methods, or objects. The crossed-referenced items must be in scope or else their fully qualified names must be used. Scope of names for comments is the same as the scope for java code. That is, if the compiler knows about it so does javadoc.

Parameters:
A - the attribute that is represented as an integer
Returns:
String that is the value of the attribute for the object.
Throws: IllegalAccessException
Is thrown in case that blah blah.
See Also:
String