/** * Generate a class page. * * @param configuration the current configuration of the doclet. * @param mapper the mapping of the class usage. * @param pkgdoc the package doc being documented. */ public static void generate( ConfigurationImpl configuration, ClassUseMapper mapper, PackageDoc pkgdoc) { PackageUseWriter pkgusegen; DocPath filename = DocPaths.PACKAGE_USE; try { pkgusegen = new PackageUseWriter(configuration, mapper, filename, pkgdoc); pkgusegen.generatePackageUseFile(); pkgusegen.close(); } catch (IOException exc) { configuration.standardmessage.error("doclet.exception_encountered", exc.toString(), filename); throw new DocletAbortException(exc); } }
/** * Write out class use pages. * * @throws DocletAbortException */ public static void generate(ConfigurationImpl configuration, ClassTree classtree) { ClassUseMapper mapper = new ClassUseMapper(configuration.root, classtree); for (ClassDoc aClass : configuration.root.classes()) { // If -nodeprecated option is set and the containing package is marked // as deprecated, do not generate the class-use page. We will still generate // the class-use page if the class is marked as deprecated but the containing // package is not since it could still be linked from that package-use page. if (!(configuration.nodeprecated && Util.isDeprecated(aClass.containingPackage()))) ClassUseWriter.generate(configuration, mapper, aClass); } for (PackageDoc pkg : configuration.packages) { // If -nodeprecated option is set and the package is marked // as deprecated, do not generate the package-use page. if (!(configuration.nodeprecated && Util.isDeprecated(pkg))) PackageUseWriter.generate(configuration, mapper, pkg); } }