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.adoc 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. = `ajdoc`, the AspectJ API documentation generator
  2. == Name
  3. `ajdoc` - generate HTML API documentation, including crosscutting structure
  4. == Synopsis
  5. [subs=+quotes]
  6. ajdoc [ -bootclasspath _classpathlist_ ] [ -classpath _classpathlist_ ] [-d _path_] [-help] [-package] [-protected] [-private] [-public] [-overview _overviewFile_] [ -sourcepath _sourcepathlist_ ] [-verbose] [-version] [_sourcefiles_... | _packages_... | @_file_... | -argfile _file_...] [ _ajc options_ ]
  7. == Description
  8. `ajdoc` renders HTML documentation for AspectJ constructs as well as the
  9. Java constructs that `javadoc` renders. In addition `ajdoc` displays the
  10. crosscutting nature in the form of links. That means, for example, that
  11. you can see everything affecting a method when reading the documentation
  12. for the method.
  13. To run `ajdoc`, use one of the scripts in the AspectJ `bin` directory.
  14. The `ajdoc` implementation builds on Sun's `javadoc` command line tool,
  15. and you use it in the same way with many of the same options (`javadoc`
  16. options are not documented here; for more information on `javadoc`
  17. usage, see the https://java.sun.com/j2se/javadoc/[Javadoc homepage].)
  18. As with `ajc` (but unlike `javadoc`), you pass `ajdoc` all your aspect
  19. source files and any files containing types affected by the aspects;
  20. it's often easiest to just pass all the `.java` and `.aj` files in your
  21. system. Unlike `ajc`, `ajdoc` will try to find package sources using the
  22. specified sourcepath if you list packages on the command line.
  23. To provide an argfile listing the source files, you can use use the same
  24. argfile (`@filename`) conventions as with `ajc`. For example, the
  25. following documents all the source files listed in `argfile.lst`,
  26. sending the output to the `docDir` output directory.
  27. [source, text]
  28. ....
  29. ajdoc -d docDir @argfile.lst
  30. ....
  31. See xref:ajc.adoc[`ajc`, the AspectJ compiler/weaver] for details on the text file
  32. format.
  33. `ajdoc` honours `ajc` options. See the xref:ajc.adoc#ajc_options[ajc
  34. documentation] for details on these options.
  35. `ajdoc` currently requires the `tools.jar` from J2SE 1.3 to be on the
  36. classpath. Normally the scripts set this up, assuming that your
  37. `JAVA_HOME` variable points to an appropriate installation of Java. You
  38. may need to provide this jar when using a different version of Java or a
  39. JRE.
  40. == Examples
  41. * Change into the `examples` directory.
  42. * Type `mkdir doc` to create the destination directory for the documentation.
  43. * Type `ajdoc -private -d doc spacewar coordination` to generate the documentation. (Use `-private` to get all members,
  44. since many of the interesting ones in spacewar are not public.)
  45. * Type `ajdoc -private -d doc @spacewar/demo.lst` to use the argfile associated with Spacewar.
  46. * To view the documentation, open the file `index.html` in the `doc` directory using a web browser.