COMP 202: Principles of Object-Oriented Programming II← Javadoc →
|Home — Fall 2008|||||Information|||||Resources|||||Exam Resources|||||OwlSpace|||||COMP 201|
The Java Development Kit (JDK) comes with a tool called Javadoc. This tool will generate documentation for Java source code with comments written in accordance with the Java documentation style. The following links show more examples. You do need to spend time outside of the lab to study them.
Click here to download a zip file (listSource.zip) containing sample Java code into your own directory. It includes Java source code for a version of lists discussed in the past few lectures.
Use DrJava to look at both the code and the comments, which follow the Javadoc conventions. The following is a very short summary of the Javadoc conventions.
Creating Javadocs using DrJava:
Now change the Javadoc Access Level in the Javadoc Preferences to private and generate Javadoc again. What is the difference?
In the class properties dialog boxes, where one can specify various aspects of a class, there are also tabs for adding comments for the class itself, for variables (fields) and for methods, including their parameters and return values.
You can generate Javadoc using the Tools/Generate Documentation menu in StructureBuilder. What you get is the UML class diagram diagram together with the Javadoc (version 1.1 style). You may use this tool to generate Javadoc and UML diagrams for all of the assignments.
See the page on Generating Documentation in StructureBuilder in the Java Resources web site for more detailed information.
Copyright © 2008-2010 Mathias Ricken and Stephen Wong