gr.spinellis.umlgraph.doclet
Class UmlGraphDoc

Package class diagram package UmlGraphDoc
java.lang.Object
  extended by gr.spinellis.umlgraph.doclet.UmlGraphDoc

public class UmlGraphDoc
extends Object

Chaining doclet that runs the standart Javadoc doclet first, and on success, runs the generation of dot files by UMLGraph


Constructor Summary
UmlGraphDoc()
           
 
Method Summary
private static void alterHtmlDocs(String outputFolder, String packageName, String className, String htmlFileName, Pattern insertPointPattern, RootDoc root)
          Takes an HTML file, looks for the first instance of the specified insertion point, and inserts the diagram image reference and a client side map in that point.
private static String findOutputPath(String[][] options)
          Returns the output path specified on the javadoc options
private static void generateContextDiagrams(RootDoc root, Options opt, String outputFolder)
          Generates the context diagram for a single class
private static void generatePackageDiagrams(RootDoc root, Options opt, String outputFolder)
          Generates the package diagrams for all of the packages that contain classes among those returned by RootDoc.class()
private static void insertClientSideMap(File mapFile, BufferedWriter writer)
          Reads the map file and outputs in to the specified writer
static LanguageVersion languageVersion()
          Standand doclet entry
static int optionLength(String option)
          Option check, forwards options to the standard doclet, if that one refuses them, they are sent to UmlGraph
private static void runGraphviz(String outputFolder, String packageName, String name, RootDoc root)
          Runs Graphviz dot building both a diagram (in png format) and a client side map for it.
static boolean start(RootDoc root)
          Standard doclet entry point
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UmlGraphDoc

public UmlGraphDoc()
Method Detail

optionLength

public static int optionLength(String option)
Option check, forwards options to the standard doclet, if that one refuses them, they are sent to UmlGraph


start

public static boolean start(RootDoc root)
Standard doclet entry point

Parameters:
root -
Returns:

languageVersion

public static LanguageVersion languageVersion()
Standand doclet entry

Returns:

generatePackageDiagrams

private static void generatePackageDiagrams(RootDoc root,
                                            Options opt,
                                            String outputFolder)
                                     throws IOException
Generates the package diagrams for all of the packages that contain classes among those returned by RootDoc.class()

Throws:
IOException

generateContextDiagrams

private static void generateContextDiagrams(RootDoc root,
                                            Options opt,
                                            String outputFolder)
                                     throws IOException
Generates the context diagram for a single class

Throws:
IOException

runGraphviz

private static void runGraphviz(String outputFolder,
                                String packageName,
                                String name,
                                RootDoc root)
Runs Graphviz dot building both a diagram (in png format) and a client side map for it.

At the moment, it assumes dot.exe is in the classpahth


alterHtmlDocs

private static void alterHtmlDocs(String outputFolder,
                                  String packageName,
                                  String className,
                                  String htmlFileName,
                                  Pattern insertPointPattern,
                                  RootDoc root)
                           throws IOException
Takes an HTML file, looks for the first instance of the specified insertion point, and inserts the diagram image reference and a client side map in that point.

Throws:
IOException

insertClientSideMap

private static void insertClientSideMap(File mapFile,
                                        BufferedWriter writer)
                                 throws IOException
Reads the map file and outputs in to the specified writer

Throws:
IOException

findOutputPath

private static String findOutputPath(String[][] options)
Returns the output path specified on the javadoc options