This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA
""/**
* This is a javadoc comment. It doesn't have any javadoc meta-tags yet, but it did trigger the javadoc parser to take a look at this comment.
*/""
Step Two Add API meta-tags (tags that describe the API itself) when commenting. API tags are parameter names, descriptions, exception profiles, return value descriptions, method names and method descriptions. Many IDEs incorporate this data into their tool tips and other helpers, as well as it being for use in HTML or comment form. Step Three Use the method description. This meta-tag has no tag name: It's simply the comment that comes before the other tags.""/**
* Computes the slope of a line.
*/""
""/**
* Computes the slope of a line.
*
* @param p1 First point that describes the line
* @param p2 Second point that describes the line
*/""
Step Five Return value descriptions. This is denoted by the @return meta-tag and should be followed by a description of the return value.""/**
* Computes the slope of a line.
*
* @param p1 First point that describes the line
* @param p2 Second point that describes the line
* @return Slope of the line as a float
*/""
Step Six Add attribution tags. The tags attribute the code to a specific author.""/**
* Computes the slope of a line.
*
* @Author Jack Smith
* @param p1 First point that describes the line
* @param p2 Second point that describes the line
* @return Slope of the line as a float
*/""
Step Seven Generate the HTML documentation. If you're not using an IDE or you just want to do it manually, you can run the javadoc command-line program from your project directory. Specify the output directory with the -d switch and pass it a list of .java files (usually as a wildcard).""javadoc -d docs *.java""