FileDocCategorySizeDatePackage
PackageListWriter.javaAPI DocExample1648Wed Apr 19 11:17:14 BST 2000com.sun.tools.doclets.standard

PackageListWriter

public class PackageListWriter extends HtmlStandardWriter
Write out the package index.
see
com.sun.javadoc.PackageDoc
see
com.sun.tools.doclets.HtmlDocWriter
author
Atul M Dambalkar

Fields Summary
Constructors Summary
public PackageListWriter(String filename)
Constructor.

        super(filename);
    
Methods Summary
public static voidgenerate(com.sun.javadoc.RootDoc root)
Generate the package index.

param
root the root of the doc tree.

        PackageListWriter packgen;
        String filename = "package-list";
        try {
            packgen = new PackageListWriter(filename);
            packgen.generatePackageListFile(root);
            packgen.close();
        } catch (IOException exc) {
 Standard.configuration().standardmessage.error("doclet.exception_encountered", 
                                                 exc.toString(), filename);
            throw new DocletAbortException();
        }
    
protected voidgeneratePackageListFile(com.sun.javadoc.RootDoc root)

        PackageDoc[] packages = Standard.configuration().packages;
        for (int i = 0; i < packages.length; i++) {
            println(packages[i].name());
        }