<html><head> | |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<title>ajdoc</title><link rel="stylesheet" href="aspectj-docs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.44"><link rel="home" href="index.html" title="The AspectJtm Development Environment Guide"><link rel="up" href="ajdoc-ref-top.html" title="ajdoc, the AspectJ documentation tool"><link rel="previous" href="ajc-ref.html" title="ajc"><link rel="next" href="aj-ref-top.html" title="aj, the AspectJ load-time weaving script"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ajdoc</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ajc-ref.html">Prev</a> </td><th width="60%" align="center"><tt>ajdoc</tt>, the AspectJ documentation tool</th><td width="20%" align="right"> <a accesskey="n" href="aj-ref-top.html">Next</a></td></tr></table><hr></div><div class="refentry"><h1 class="title"><a name="ajdoc-ref"></a>ajdoc</h1><div class="refnamediv"><a name="d0e806"></a><h2>Name</h2>ajdoc — generate HTML API documentation, including crosscutting structure | |
</div><div class="refsynopsisdiv"><a name="d0e811"></a><h2>Synopsis</h2><div class="cmdsynopsis" id="d0e812"><a name="d0e812"></a><tt>ajdoc</tt> [ | |
-bootclasspath <i><tt>classpathlist</tt></i> | |
] [ | |
-classpath <i><tt>classpathlist</tt></i> | |
] [-d <i><tt>path</tt></i>] [-help] [-package] [-protected] [-private] [-public] [-overview <i><tt>overviewFile</tt></i>] [ | |
-sourcepath <i><tt>sourcepathlist</tt></i> | |
] [-verbose] [-version] [<i><tt>sourcefiles...</tt></i> | <i><tt>packages...</tt></i> | @<i><tt>file...</tt></i> | -argfile <i><tt>file...</tt></i>] [ | |
<i><tt>ajc options</tt></i> | |
]</div></div><div class="refsect1"><a name="d0e872"></a><h2>Description</h2><p> | |
<b>ajdoc</b> renders HTML documentation for AspectJ | |
constructs as well as the Java constructs that | |
<b>javadoc</b> renders. | |
In addition <b>ajdoc</b> displays the crosscutting | |
nature in the form of links. That means, for example, that | |
you can see everything affecting a method when reading | |
the documentation for the method. | |
</p><p> | |
To run <b>ajdoc</b>, use one of the scripts in the | |
AspectJ <tt>bin</tt> directory. | |
The <b>ajdoc</b> implementation builds on Sun's <b>javadoc</b> | |
command line tool, and you use it in the same way with many of | |
the same options | |
(<b>javadoc</b> options are not documented here; | |
for more information on <b>javadoc</b> usage, see the | |
<a href="http://java.sun.com/j2se/javadoc/" target="_top">Javadoc homepage</a>.) | |
</p><p> | |
As with <b>ajc</b> (but unlike <b>javadoc</b>), | |
you pass <b>ajdoc</b> all your aspect source files | |
and any files containing types affected by the aspects; | |
it's often easiest to just pass all the <tt>.java</tt> | |
and <tt>.aj</tt> files in your system. | |
Unlike <b>ajc</b>, | |
<b>ajdoc</b> will try to find package sources using the | |
specified sourcepath if you list packages on the command line. | |
</p><p> | |
To provide an argfile listing the source files, you can use | |
use the same argfile (<tt>@filename</tt>) conventions | |
as with <b>ajc</b>. | |
For example, the following documents all the source files listed | |
in <tt>argfile.lst</tt>, sending the output to | |
the <tt>docDir</tt> output directory. | |
<pre class="programlisting">ajdoc -d docDir @argfile.lst</pre> | |
See the <a href="ajc-ref.html#ajc" title="Description">ajc documentation</a> | |
for details on the text file format. | |
</p><p> | |
<b>ajdoc</b> honours <b>ajc</b> options. See | |
the <a href="ajc-ref.html#ajc_options" title="Options">ajc documentation</a> for details on | |
these options. | |
</p><p> | |
<b>ajdoc</b> currently requires the | |
<tt>tools.jar</tt> from J2SE 1.3 to be on the classpath. | |
Normally the scripts set this up, assuming that your <tt>JAVA_HOME</tt> | |
variable points to an appropriate installation of Java. | |
You may need to provide this jar when using a different | |
version of Java or a JRE. | |
</p></div><div class="refsect1"><a name="d0e974"></a><h2>Examples</h2><div class="example"><p><a name="ajdocdocumentingspacewar"></a><b>Example 2.4. Documenting Spacewar</b></p><div class="itemizedlist"><ul><li><p><a name="d0e982"></a> | |
Change into the <tt>examples</tt> directory. | |
</p></li><li><p><a name="d0e988"></a> | |
Type <b><tt>mkdir doc</tt></b> to create the | |
destination directory for the documentation. | |
</p></li><li><p><a name="d0e994"></a> | |
Type <b><tt>ajdoc -private -d doc spacewar | |
coordination</tt></b> to generate the documentation. | |
</p><div class="itemizedlist"><ul><li><p><a name="d0e1001"></a> | |
(Use <tt>-private</tt> to get all members, since | |
may of the interesting ones in spacewar are not public.) | |
</p></li></ul></div></li><li><p><a name="d0e1007"></a> | |
Type <b><tt>ajdoc -private -d doc @spacewar/demo.lst</tt></b> | |
to use the argfile associated with Spacewar. | |
</p></li><li><p><a name="d0e1013"></a> | |
To view the documentation, open the file <tt>index.html</tt> | |
in the <tt>doc</tt> directory using a web browser. | |
</p></li></ul></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ajc-ref.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="aj-ref-top.html">Next</a></td></tr><tr><td width="40%" align="left">ajc </td><td width="20%" align="center"><a accesskey="u" href="ajdoc-ref-top.html">Up</a></td><td width="40%" align="right"> <tt>aj</tt>, the AspectJ load-time weaving script</td></tr></table></div></body></html> |