ajdoc(1)
β¨ NAME β¨
Okay bestie, meet ajdoc π It generates HTML API documentation, including the crosscutting structure π¦
π SYNOPSIS π
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 ]
π Description π
Okay so, ajdoc renders HTML docs for AspectJ constructs AND the Java constructs that javadoc already renders β¨ Lowkey the best part is the crosscutting info, which shows up as links π₯ So you can see everything affecting a method while you're reading that method's docs. It's giving main character energy π
To run it, use one of the scripts in the AspectJ bin directory π The ajdoc implementation builds on Sun's javadoc command line tool, and you use it the same way with a lot of the same options π (The javadoc options aren't documented here, so if you need them, check the Javadoc homepage at http://java.sun.com/j2se/javadoc/ π§)
Like with ajc (but unlike javadoc), you pass ajdoc all your aspect source files AND any files with types the aspects affect π«Ά Honestly the easiest move is to just pass every .java and .aj file in your system π Unlike ajc, though, ajdoc will try to find package sources using the sourcepath you specify if you list packages on the command line π¦
Want to hand it an argfile listing your source files? Use the same @filename conventions as ajc π For example, this documents all the source files listed in argfile.lst and sends the output to the docDir output directory:
ajdoc -d docDir @argfile.lst
For the details on the text file format, see the ajc documentation π
ajdoc honours ajc options too π
Check the ajc documentation for the deets on those.
β οΈ Heads up, bestie:ajdoccurrently requirestools.jarfrom J2SE 1.3 to be on the classpath π Normally the scripts set this up for you, as long as yourJAVA_HOMEvariable points to an appropriate Java installation. If you're using a different version of Java or a JRE, you might need to provide this jar yourself π
πΈ Examples πΈ
π Documenting Spacewar π
- Change into the
examplesdirectory π§ - Make a destination directory for the docs:
mkdir docπ· - Type
ajdoc -private -d doc spacewar coordinationπ₯- Use
-privateto get all the members, because many of the really interesting ones in Spacewar aren't public π
- Use
- Type
ajdoc -private -d doc @spacewar/demo.lstto use the argfile that goes with Spacewar π - To view the docs, open
index.htmlin thedocdirectory with a web browser π
That's the whole manual page for ajdoc(1) π β¨ Go document something iconic, bestie π«Άπ
π¦ where this page comes from
- debian bookworm: aspectj 1.9.5-2 Β· EPL-1.0
- debian trixie: aspectj 1.9.6-1 Β· EPL-1.0
- ubuntu jammy: aspectj 1.9.2-2 Β· EPL-1.0
- ubuntu noble: aspectj 1.9.5-2 Β· EPL-1.0
- ubuntu questing: aspectj 1.9.6-1
- ubuntu resolute: aspectj 1.9.6-1build1 Β· EPL-1.0
- ubuntu stonking: aspectj 1.9.6-1build1 Β· EPL-1.0
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms