You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ajdoc.xml 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <refentry id="ajdoc-ref" xreflabel="The ajdoc Command-line Reference">
  2. <refnamediv>
  3. <refname>ajdoc</refname>
  4. <refpurpose>generate HTML API documentation, including crosscutting structure
  5. </refpurpose>
  6. </refnamediv>
  7. <refsynopsisdiv>
  8. <cmdsynopsis>
  9. <command>ajdoc</command>
  10. <arg choice="opt">
  11. -bootclasspath <replaceable>classpathlist</replaceable>
  12. </arg>
  13. <arg choice="opt">
  14. -classpath <replaceable>classpathlist</replaceable>
  15. </arg>
  16. <arg choice="opt">-d <replaceable>path</replaceable></arg>
  17. <arg choice="opt">-help</arg>
  18. <arg choice="opt">-package</arg>
  19. <arg choice="opt">-protected</arg>
  20. <arg choice="opt">-private</arg>
  21. <arg choice="opt">-public</arg>
  22. <arg choice="opt">-overview <replaceable>overviewFile</replaceable></arg>
  23. <arg choice="opt">
  24. -sourcepath <replaceable>sourcepathlist</replaceable>
  25. </arg>
  26. <arg>-verbose</arg>
  27. <arg>-version</arg>
  28. <group>
  29. <arg><replaceable>sourcefiles...</replaceable></arg>
  30. <arg><replaceable>packages...</replaceable></arg>
  31. <arg>@<replaceable>file...</replaceable></arg>
  32. <arg>-argfile <replaceable>file...</replaceable></arg>
  33. </group>
  34. <arg choice="opt">
  35. <replaceable>ajc options</replaceable>
  36. </arg>
  37. </cmdsynopsis>
  38. </refsynopsisdiv>
  39. <refsect1>
  40. <title>Description</title>
  41. <para>
  42. <command>ajdoc</command> renders HTML documentation for AspectJ
  43. constructs as well as the Java constructs that
  44. <command>javadoc</command> renders.
  45. In addition <command>ajdoc</command> displays the crosscutting
  46. nature in the form of links. That means, for example, that
  47. you can see everything affecting a method when reading
  48. the documentation for the method.
  49. </para>
  50. <para>
  51. To run <command>ajdoc</command>, use one of the scripts in the
  52. AspectJ <filename>bin</filename> directory.
  53. The <command>ajdoc</command> implementation builds on Sun's <command>javadoc</command>
  54. command line tool, and you use it in the same way with many of
  55. the same options
  56. (<command>javadoc</command> options are not documented here;
  57. for more information on <command>javadoc</command> usage, see the
  58. <ulink url="http://java.sun.com/j2se/javadoc/">Javadoc homepage</ulink>.)
  59. </para>
  60. <para>
  61. As with <command>ajc</command> (but unlike <command>javadoc</command>),
  62. you pass <command>ajdoc</command> all your aspect source files
  63. and any files containing types affected by the aspects;
  64. it's often easiest to just pass all the <filename>.java</filename>
  65. and <filename>.aj</filename> files in your system.
  66. Unlike <command>ajc</command>,
  67. <command>ajdoc</command> will try to find package sources using the
  68. specified sourcepath if you list packages on the command line.
  69. </para>
  70. <para>
  71. To provide an argfile listing the source files, you can use
  72. use the same argfile (<filename>@filename</filename>) conventions
  73. as with <command>ajc</command>.
  74. For example, the following documents all the source files listed
  75. in <filename>argfile.lst</filename>, sending the output to
  76. the <literal>docDir</literal> output directory.
  77. <programlisting>ajdoc -d docDir @argfile.lst</programlisting>
  78. See the <link linkend="ajc">ajc documentation</link>
  79. for details on the text file format.
  80. </para>
  81. <para>
  82. <command>ajdoc</command> honours <command>ajc</command> options. See
  83. the <link linkend="ajc_options">ajc documentation</link> for details on
  84. these options.
  85. </para>
  86. <para>
  87. <command>ajdoc</command> currently requires the
  88. <filename>tools.jar</filename> from J2SE 1.3 to be on the classpath.
  89. Normally the scripts set this up, assuming that your <literal>JAVA_HOME</literal>
  90. variable points to an appropriate installation of Java.
  91. You may need to provide this jar when using a different
  92. version of Java or a JRE.
  93. </para>
  94. </refsect1>
  95. <refsect1>
  96. <title>Examples</title>
  97. <example id="ajdocdocumentingspacewar"> <!-- docbook bug - rendering this as example 4? -->
  98. <title>Documenting Spacewar</title>
  99. <itemizedlist>
  100. <listitem>
  101. <para>
  102. Change into the <filename>examples</filename> directory.
  103. </para>
  104. </listitem>
  105. <listitem>
  106. <para>
  107. Type <userinput>mkdir doc</userinput> to create the
  108. destination directory for the documentation.
  109. </para>
  110. </listitem>
  111. <listitem>
  112. <para>
  113. Type <userinput>ajdoc -private -d doc spacewar
  114. coordination</userinput> to generate the documentation.
  115. </para>
  116. <itemizedlist>
  117. <listitem>
  118. <para>
  119. (Use <literal>-private</literal> to get all members, since
  120. may of the interesting ones in spacewar are not public.)
  121. </para>
  122. </listitem>
  123. </itemizedlist>
  124. </listitem>
  125. <listitem>
  126. <para>
  127. Type <userinput>ajdoc -private -d doc @spacewar/demo.lst</userinput>
  128. to use the argfile associated with Spacewar.
  129. </para>
  130. </listitem>
  131. <listitem>
  132. <para>
  133. To view the documentation, open the file <filename>index.html</filename>
  134. in the <filename>doc</filename> directory using a web browser.
  135. </para>
  136. </listitem>
  137. </itemizedlist>
  138. </example>
  139. </refsect1>
  140. </refentry>
  141. <!-- Local variables: -->
  142. <!-- fill-column: 79 -->
  143. <!-- sgml-local-ecat-files: devguide.ced -->
  144. <!-- sgml-parent-document:("devguide.sgml" "book" "refentry") -->
  145. <!-- End: -->