This is a very simple wrapper program that enables you to exclude from the generated documentation any public or protected classes (or packages) that you specify. It takes a list of classes in a file and removes them from the RootDoc before delegating execution to the standard doclet.
Works with JDK 1.4.x and 5.x.
NOTE: Excluding packages is not unique to this doclet. The javadoc tool already has the -exclude option to exclude packages when using the -subpackages option.
C:> more skip.txt
# Exclude six classes
java.lang.Math
java.lang.Long
java.lang.InternalError
java.lang.InterruptedException
java.lang.Iterable
java.lang.LinkageError
Given that ExcludeDoclet.class is in the current directory, tools.jar is in C:\jdk1.5.0\lib, and that skip.txt is in the current directory, run the following command (on Windows):
C:> java -classpath .;C:\jdk1.5.0\lib\tools.jar ExcludeDoclet -excludefile ./skip.txt -d docs -sourcepath C:\j2se\src -source 1.5 java.langThis runs javadoc on the java.lang package, excluding the classes specified in skip.txt. It runs on the source files located at c:\j2se\src\java\lang\*.java, and saves the generated HTML files in the .\docs directory. This command prints a list of files it is excluding:
Removing excluded source files.......
Excluding com.package1.DeprecatedClass
If you modify the doclet's source file, you can re-compile it as follows:C:> javac -classpath tools.jar ExcludeDoclet.java