You will find a command line tool called ajdoc in the bin directory. This tool is based on the JDK's javadoc command line tool, and can be used similarly to javadoc. For more information on javadoc usage, consult the Javadoc homepage. Unlike javadoc, ajdoc requires that you include all files that either have aspects in them, or that are affected by any crosscuts. Generally, this means that you should pass all .java files in your system to ajdoc.
In addition to generating the standard Javadoc documentation, ajdoc also generates documentation for crosscuts, advice, and introductions. ajdoc will also add links indicating what members an advice or introduction affects. For introduced fields ajdoc inserts a link to the corresponding introduction, and similarly for advised methods ajdoc inserts a link or links to the corresponding advice.
In addition, any element of the flags or arguments can be of the form @filename, in which case the provides a set of flags and or filenames that are inserted at that point. For example, the following would document all of the files listed in @classes and place them in the doc directory.
ajdoc -d docDir @classes
The syntax of the files is that each line of the file is taken to be a single flag or filename. These files may also include Java-style single-line comments where all text on a line after the symbol '//' is discarded.
If you are using a bash shell, you may have problems with the '@' character being processed specially by the shell. If you experience problems with this, you can use the -argfile option instead:
ajdoc -d docDir -argfile classes
Example 3. Documenting Spacewar
Type mkdir doc to create the destination directory for the documentation.
Type ajdoc -private -d doc spacewar coordination to generate the documentation.
Note that the -private flag is passed because the most of the interesting classes and members in Spacewar do not have public visibility.
If you want to generate documentation without package-savvy navigation you can type: ajdoc -private -d doc @spacewar/demo.lst which has the effect of passing all of the .java files associated with Spacewar to ajdoc.
Open the file index.html in the doc directory using a web browser to view the documentation.