HOME      NEWS      MAP

New Doclet

A new enhanced doclet (written by Gerald Boersma) is now available.

It has much more option than the legacy previous one.

You will find detailed instructions here.

UMLDoclet

An open source doclet is now available on github..

It's also available in Maven central for easy inclusion in any java projects.

Usage:

Old legacy doclet

You can generate a PlantUML description for UML-class diagram out of Java-source. Only public fields and methods will be exported.

The jar for the doclet is available here: plantUmlDoclet.jar

The association are based only on field declaration and Javadoc-Tags in methods.

There are following Javadoc-Tags to describe associations, according to UMLGraph:

For configuration following system.properties can be used:

Ant-Script example

<project>
<target name="main">
<javadoc doclet="de.mallox.doclet.PlantUMLDoclet"
   docletpath="plantUmlDoclet.jar" 
   access="private" 
   additionalparam=
   "-J-DdestinationFile=uml.txt -J-DcreatePackages=false -J-DshowPublicMethods=true -J-DshowPublicConstructors=false -J-DshowPublicFields=true"
   > 
  <packageset dir="src"> 
   <include name="**"/> 
  </packageset> 
</javadoc> 

<java jar="plantuml.jar" fork="true" maxmemory="128m">
 <arg value="uml.txt"/> 
</java>
</target>
</project>

Image example


Source example

package demo;

class Controller {}
class EmbeddedAgent {}
class PowerManager {}

/**
 * @extends Controller
 * @extends EmbeddedAgent
 * @navassoc - - 1..* PowerManager
 * @note this is a note
 */
class SetTopController implements URLStreamHandler {
  public String name;

  int authorizationLevel;
  void startUp() {}
  void shutDown() {}
  void connect() {}
}

/** @depend - friend - SetTopController */
class ChannelIterator {}

interface URLStreamHandler {
  void OpenConnection();
  void parseURL();
  void setURL();
  void toExternalForm();
}

HOME      NEWS      MAP