org.backsource.utils.javadoc
Class JTidyDoclet

java.lang.Object
  extended byorg.backsource.utils.javadoc.JTidyDoclet

public class JTidyDoclet
extends java.lang.Object

A simple doclet that runs the javadoc in the specifyed classes/packages through jtidy.

This might be handy to have when you get tired on fixing the HTML in your comments. Running this with javadoc as a doclet will produce text output with the cleaned comments either on stdout or in the filesystem.

The doclet takes one extra parameter -d. If specifyed the output will be written out in the dir pointed to by the argument to -d. The dir must exist.

Here is an example of how to set this up in ant:

   
 <target name="jtidy" depends="prepare">
 <mkdir dir="${basedir}/tidy"/>
 
 <javadoc packagenames="${packages}"
 destdir="${basedir}/tidy"
 sourcepath="${src.dir}"
 classpath="${classpath}"
 extdirs="${lib.dir}"
 doclet="org.backsource.utils.javadoc.JTidyDoclet"
 docletpath="${classes.dir}:${lib.dir}/Tidy.jar"
 />
 </target>
 

Version:
$Revision: 1.1.1.1 $
Author:

Constructor Summary
JTidyDoclet(com.sun.javadoc.RootDoc root)
           
 
Method Summary
 void doClass(com.sun.javadoc.ClassDoc classDoc)
           
 void doClasses()
           
 java.lang.String doMethod(com.sun.javadoc.MethodDoc meth)
           
 void doPackage(com.sun.javadoc.PackageDoc doc)
           
 java.lang.String dotit(java.lang.String in)
           
 void doWrite(java.lang.String pack, java.lang.String clazz, java.lang.String content)
           
 java.io.File getFile(java.lang.String pack, java.lang.String clazz, java.lang.String sufix)
           
static void main(java.lang.String[] args)
           
static int optionLength(java.lang.String option)
           
static boolean start(com.sun.javadoc.RootDoc root)
           
 java.lang.String tidy(java.lang.String comment)
           
static boolean validOptions(java.lang.String[][] options, com.sun.javadoc.DocErrorReporter reporter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTidyDoclet

public JTidyDoclet(com.sun.javadoc.RootDoc root)
            throws java.lang.Exception
Method Detail

start

public static boolean start(com.sun.javadoc.RootDoc root)
                     throws java.lang.Exception
Throws:
java.lang.Exception

optionLength

public static int optionLength(java.lang.String option)

validOptions

public static boolean validOptions(java.lang.String[][] options,
                                   com.sun.javadoc.DocErrorReporter reporter)

doClasses

public void doClasses()
               throws java.lang.Exception
Throws:
java.lang.Exception

doClass

public void doClass(com.sun.javadoc.ClassDoc classDoc)
             throws java.lang.Exception
Throws:
java.lang.Exception

doMethod

public java.lang.String doMethod(com.sun.javadoc.MethodDoc meth)
                          throws java.lang.Exception
Throws:
java.lang.Exception

doPackage

public void doPackage(com.sun.javadoc.PackageDoc doc)
               throws java.lang.Exception
Throws:
java.lang.Exception

tidy

public java.lang.String tidy(java.lang.String comment)
                      throws java.lang.Exception
Throws:
java.lang.Exception

dotit

public java.lang.String dotit(java.lang.String in)
                       throws java.lang.Exception
Throws:
java.lang.Exception

doWrite

public void doWrite(java.lang.String pack,
                    java.lang.String clazz,
                    java.lang.String content)
             throws java.lang.Exception
Throws:
java.lang.Exception

getFile

public java.io.File getFile(java.lang.String pack,
                            java.lang.String clazz,
                            java.lang.String sufix)
                     throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)


Copyright © 2000-2004 Backsource. All Rights Reserved.