void generate() {
        if (rootDoc == null || outputdir == null) {
            return;
        }
        PackageDoc[] pds = rootDoc.specifiedPackages();
        for (int i = 0; i < pds.length; i++) {
            // If -nodeprecated option is set and the package is marked as deprecated,
            // do not convert the package files to HTML.
            if (!(configuration.nodeprecated && Util.isDeprecated(pds[i])))
                convertPackage(pds[i], outputdir);
        }
        ClassDoc[] cds = rootDoc.specifiedClasses();
        for (int i = 0; i < cds.length; i++) {
            // If -nodeprecated option is set and the class is marked as deprecated
            // or the containing package is deprecated, do not convert the
            // package files to HTML.
            if (!(configuration.nodeprecated &&
                    (Util.isDeprecated(cds[i]) || Util.isDeprecated(cds[i].containingPackage()))))
                convertClass(cds[i], outputdir);
        }
    }