Each doclet is programmed in the form of a template (or a set of templates)
using a high quality graphic Template Designer included in the package.
Further, the template (or the main template if there are several ones) is passed as an argument
to a special interpreter, which, at the same time, serves the role of
an ordinary Javadoc doclet (so that it should be specified on the Javadoc command line
using -doclet
option).
The template interpreter, which is called “DocFlex Doclet”, is the second major part of the DocFlex/Javadoc software. Once launched by Javadoc, the DocFlex Doclet connects to the Doclet API and by interpreting the instructions contained in the specified template generates the output documentation. In that way, each pair {DocFlex Doclet + template set} behaves as a unique full-blown Javadoc doclet.
What can be generated with such a doclet? Almost anything! For instance, the standard template set (included in DocFlex/Javadoc) is able to generate:
The output format is specified as another DocFlex Doclet's argument (along with the main template). The following output formats are supported now:
The following screenshots show a framed HTML (left) and pages of RTF (right) demo documentation generated with the standard templates (click to enlarge):
All of those settings can be specified as options on the Javadoc command line. In addition, DocFlex Doclet provides a more user-friendly way of specifying everything using a little GUI. The following screenshots show some dialogs of that GUI (click to enlarge):
If you consider how almost any Java library that generates something (and not only generates -- for instance, powers a GUI system) works, you will notice that, basically, it may be described like this:
dlg.show()
)
Now, imagine that such a controlling structure is serialized to a file. What is that file then? One may call it a "template"!
But if that is a template, why not to create/edit it using some designer GUI (rather than creating it with the methods of some Java classes)? This way has a number of advantages:
The following screenshot show the class.tpl
template
(which is included in the standard template set and generates the bulk of documentation)
open in the Template Designer (click to enlarge):
The version 1.5 is a milestone of DocFlex/Javadoc development. Since that version, DocFlex/Javadoc fully supports all new language features introduced in Java 5. In particular, this includes two major innovations:
Because, since JDK 5.0, the Doclet API is extended to reflect the new language features introduced in Java 5, a doclet developed for Java 5 will not work under Java 1.4.
However, as Java 1.4 may be still in use, DocFlex/Javadoc 1.5 supports both Java versions (i.e. the new Doclet API 1.5 and the old Doclet API 1.4).
Since the binaries compiled for Java 5 are not compatible with Java 1.4, now, DocFlex/Javadoc 1.5 includes two Java libraries: the one compiled for Java 5+ and another one compiled for Java 1.4.
The Doclet DSM (Data Source Model), on which any DocFlex/Javadoc templates are based, is always the same: the Java 5 functionality (i.e. the mapping of entire Doclet API 1.5 on a virtual XML document model) is present in both libraries. However, in the version compiled for Java 1.4, everything concerned Java 5 is emulated by the Doclet DSM Driver itself.
As a result, any templates designed for either Java version will work fine under both Java 5+ and Java 1.4 as well. The templates simply won't “notice” the difference!
The following are two tests that have been run on Java SE 6 JDK Source Code (downloaded from: http://download.java.net/jdk6/) using basic templates and default generator settings.
This is the result of the generation of a framed HTML documentation by the Java sources of
all java.*
packages and all their subpackages (i.e. the entire Java core class library):
|
This is the result of the generation of a single-file RTF documentation by the Java sources
of javax.swing
package and subpackages:
|
DocFlex/Javadoc home page:
http://www.filigris.com/products/docflex_javadoc/
Free downloads:
http://www.filigris.com/downloads/