Class UsingJavadoc

java.lang.Object
  extended by UsingJavadoc

public class UsingJavadoc
extends java.lang.Object

This class is a demo of javadoc.
This comment will go at the top with the name of the class.
To javadoc this file while creating a tech spec, try
javadoc -private UsingJavadoc.java


Field Summary
private  int x
          the integer x.
this top part will go in the field summary.
 int y
          the integer y
 
Constructor Summary
UsingJavadoc()
          the default constructor.
 
Method Summary
 void moreOnJavadoc()
          Other commands you can give javadoc.
 int someMethod(int p)
          purpose: this is an example of what Javadoc can do
These lines go into the method summary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

private int x
the integer x.
this top part will go in the field summary. This part on the next line goes into the field details


y

public int y
the integer y

Constructor Detail

UsingJavadoc

public UsingJavadoc()
the default constructor.
The top line of this comment will go in the constructor summary
All the lines go into the constructor detail.

Method Detail

someMethod

public int someMethod(int p)
purpose: this is an example of what Javadoc can do
These lines go into the method summary. As soon as i use a period (see the beginning of this sentence), it stops. All lines go into the method detail. Note that despite the blank line above this section, we dont get a line break. you can use an html tag to make line breaks. (Notice the line
break in the Javadoc)

Parameters:
p - this is my parameter...
Returns:
this method returns an integer which is the input plus one

code or pseudo code goes in tags like these Notice that the previous words appear in a different font.

other html tags such as

for paragraph work too. Notice that a new paragraph started in the Javadoc. If you know other html tags, you can experiment with them.

Don't use too many html tags tho since it makes the Java harder to read

precondition: not a whole lot

postcondition: something i'm sure

There are html tags which render lines as-is. These may also help with pseudo code.

 this is being               shown   exactly    as typed
    even the line breaks       and crazy spacing
notice that if i leave the star off the begining of the line,  
       the start is from the page edge, not the star line
 

moreOnJavadoc

public void moreOnJavadoc()
Other commands you can give javadoc.
javadoc -d a_directory
The resulting html files will be put in the "a_directory" directory.

javadoc -help
This will let you see all the options javadoc can use