Java Code Examples for com.sun.tools.javac.jvm.Profile#lookup()
The following examples show how to use
com.sun.tools.javac.jvm.Profile#lookup() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PackageIndexWriter.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * {@inheritDoc} */ protected void addProfilesList(Content profileSummary, Content body) { Content h2 = HtmlTree.HEADING(HtmlTag.H2, profileSummary); Content profilesDiv = HtmlTree.DIV(h2); Content ul = new HtmlTree(HtmlTag.UL); String profileName; for (int i = 1; i < configuration.profiles.getProfileCount(); i++) { profileName = Profile.lookup(i).name; // If the profile has valid packages to be documented, add it to the // profiles list on overview-summary.html page. if (configuration.shouldDocumentProfile(profileName)) { Content profileLinkContent = getTargetProfileLink("classFrame", new StringContent(profileName), profileName); Content li = HtmlTree.LI(profileLinkContent); ul.addContent(li); } } profilesDiv.addContent(ul); Content div = HtmlTree.DIV(HtmlStyle.contentContainer, profilesDiv); body.addContent(div); }
Example 2
Source File: ProfileIndexFrameWriter.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * {@inheritDoc} */ protected void addProfilesList(Profiles profiles, String text, String tableSummary, Content body) { Content heading = HtmlTree.HEADING(HtmlConstants.PROFILE_HEADING, true, profilesLabel); Content div = HtmlTree.DIV(HtmlStyle.indexContainer, heading); HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.setTitle(profilesLabel); String profileName; for (int i = 1; i < profiles.getProfileCount(); i++) { profileName = (Profile.lookup(i)).name; // If the profile has valid packages to be documented, add it to the // left-frame generated for profile index. if (configuration.shouldDocumentProfile(profileName)) ul.addContent(getProfile(profileName)); } div.addContent(ul); body.addContent(div); }
Example 3
Source File: PackageIndexWriter.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * {@inheritDoc} */ protected void addProfilesList(Content profileSummary, Content body) { Content h2 = HtmlTree.HEADING(HtmlTag.H2, profileSummary); Content profilesDiv = HtmlTree.DIV(h2); Content ul = new HtmlTree(HtmlTag.UL); String profileName; for (int i = 1; i < configuration.profiles.getProfileCount(); i++) { profileName = Profile.lookup(i).name; // If the profile has valid packages to be documented, add it to the // profiles list on overview-summary.html page. if (configuration.shouldDocumentProfile(profileName)) { Content profileLinkContent = getTargetProfileLink("classFrame", new StringContent(profileName), profileName); Content li = HtmlTree.LI(profileLinkContent); ul.addContent(li); } } profilesDiv.addContent(ul); Content div = HtmlTree.DIV(HtmlStyle.contentContainer, profilesDiv); body.addContent(div); }
Example 4
Source File: ProfileIndexFrameWriter.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * {@inheritDoc} */ protected void addProfilesList(Profiles profiles, String text, String tableSummary, Content body) { Content heading = HtmlTree.HEADING(HtmlConstants.PROFILE_HEADING, true, profilesLabel); Content div = HtmlTree.DIV(HtmlStyle.indexContainer, heading); HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.setTitle(profilesLabel); String profileName; for (int i = 1; i < profiles.getProfileCount(); i++) { profileName = (Profile.lookup(i)).name; // If the profile has valid packages to be documented, add it to the // left-frame generated for profile index. if (configuration.shouldDocumentProfile(profileName)) ul.addContent(getProfile(profileName)); } div.addContent(ul); body.addContent(div); }
Example 5
Source File: PackageIndexWriter.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * {@inheritDoc} */ protected void addProfilesList(Content profileSummary, Content body) { Content h2 = HtmlTree.HEADING(HtmlTag.H2, profileSummary); Content profilesDiv = HtmlTree.DIV(h2); Content ul = new HtmlTree(HtmlTag.UL); String profileName; for (int i = 1; i < configuration.profiles.getProfileCount(); i++) { profileName = Profile.lookup(i).name; // If the profile has valid packages to be documented, add it to the // profiles list on overview-summary.html page. if (configuration.shouldDocumentProfile(profileName)) { Content profileLinkContent = getTargetProfileLink("classFrame", new StringContent(profileName), profileName); Content li = HtmlTree.LI(profileLinkContent); ul.addContent(li); } } profilesDiv.addContent(ul); Content div = HtmlTree.DIV(HtmlStyle.contentContainer, profilesDiv); body.addContent(div); }
Example 6
Source File: PackageIndexWriter.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * {@inheritDoc} */ protected void addProfilesList(Content profileSummary, Content body) { Content h2 = HtmlTree.HEADING(HtmlTag.H2, profileSummary); Content profilesDiv = HtmlTree.DIV(h2); Content ul = new HtmlTree(HtmlTag.UL); String profileName; for (int i = 1; i < configuration.profiles.getProfileCount(); i++) { profileName = Profile.lookup(i).name; // If the profile has valid packages to be documented, add it to the // profiles list on overview-summary.html page. if (configuration.shouldDocumentProfile(profileName)) { Content profileLinkContent = getTargetProfileLink("classFrame", new StringContent(profileName), profileName); Content li = HtmlTree.LI(profileLinkContent); ul.addContent(li); } } profilesDiv.addContent(ul); Content div = HtmlTree.DIV(HtmlStyle.contentContainer, profilesDiv); body.addContent(div); }
Example 7
Source File: PackageIndexWriter.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * {@inheritDoc} */ protected void addProfilesList(Content profileSummary, Content body) { Content h2 = HtmlTree.HEADING(HtmlTag.H2, profileSummary); Content profilesDiv = HtmlTree.DIV(h2); Content ul = new HtmlTree(HtmlTag.UL); String profileName; for (int i = 1; i < configuration.profiles.getProfileCount(); i++) { profileName = Profile.lookup(i).name; // If the profile has valid packages to be documented, add it to the // profiles list on overview-summary.html page. if (configuration.shouldDocumentProfile(profileName)) { Content profileLinkContent = getTargetProfileLink("classFrame", new StringContent(profileName), profileName); Content li = HtmlTree.LI(profileLinkContent); ul.addContent(li); } } profilesDiv.addContent(ul); Content div = HtmlTree.DIV(HtmlStyle.contentContainer, profilesDiv); body.addContent(div); }
Example 8
Source File: ProfileIndexFrameWriter.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * {@inheritDoc} */ protected void addProfilesList(Profiles profiles, String text, String tableSummary, Content body) { Content heading = HtmlTree.HEADING(HtmlConstants.PROFILE_HEADING, true, profilesLabel); Content div = HtmlTree.DIV(HtmlStyle.indexContainer, heading); HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.setTitle(profilesLabel); String profileName; for (int i = 1; i < profiles.getProfileCount(); i++) { profileName = (Profile.lookup(i)).name; // If the profile has valid packages to be documented, add it to the // left-frame generated for profile index. if (configuration.shouldDocumentProfile(profileName)) ul.addContent(getProfile(profileName)); } div.addContent(ul); body.addContent(div); }
Example 9
Source File: PackageIndexWriter.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * {@inheritDoc} */ protected void addProfilesList(Content profileSummary, Content body) { Content h2 = HtmlTree.HEADING(HtmlTag.H2, profileSummary); Content profilesDiv = HtmlTree.DIV(h2); Content ul = new HtmlTree(HtmlTag.UL); String profileName; for (int i = 1; i < configuration.profiles.getProfileCount(); i++) { profileName = Profile.lookup(i).name; // If the profile has valid packages to be documented, add it to the // profiles list on overview-summary.html page. if (configuration.shouldDocumentProfile(profileName)) { Content profileLinkContent = getTargetProfileLink("classFrame", new StringContent(profileName), profileName); Content li = HtmlTree.LI(profileLinkContent); ul.addContent(li); } } profilesDiv.addContent(ul); Content div = HtmlTree.DIV(HtmlStyle.contentContainer, profilesDiv); body.addContent(div); }
Example 10
Source File: ProfileIndexFrameWriter.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * {@inheritDoc} */ protected void addProfilesList(Profiles profiles, String text, String tableSummary, Content body) { Content heading = HtmlTree.HEADING(HtmlConstants.PROFILE_HEADING, true, profilesLabel); Content div = HtmlTree.DIV(HtmlStyle.indexContainer, heading); HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.setTitle(profilesLabel); String profileName; for (int i = 1; i < profiles.getProfileCount(); i++) { profileName = (Profile.lookup(i)).name; // If the profile has valid packages to be documented, add it to the // left-frame generated for profile index. if (configuration.shouldDocumentProfile(profileName)) ul.addContent(getProfile(profileName)); } div.addContent(ul); body.addContent(div); }
Example 11
Source File: ProfileIndexFrameWriter.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * {@inheritDoc} */ protected void addProfilesList(Profiles profiles, String text, String tableSummary, Content body) { Content heading = HtmlTree.HEADING(HtmlConstants.PROFILE_HEADING, true, profilesLabel); Content div = HtmlTree.DIV(HtmlStyle.indexContainer, heading); HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.setTitle(profilesLabel); String profileName; for (int i = 1; i < profiles.getProfileCount(); i++) { profileName = (Profile.lookup(i)).name; // If the profile has valid packages to be documented, add it to the // left-frame generated for profile index. if (configuration.shouldDocumentProfile(profileName)) ul.addContent(getProfile(profileName)); } div.addContent(ul); body.addContent(div); }
Example 12
Source File: ProfilePackageFrameWriter.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Generate a profile package summary page for the left-hand bottom frame. Construct * the ProfilePackageFrameWriter object and then uses it generate the file. * * @param configuration the current configuration of the doclet. * @param packageDoc The package for which "profilename-package-frame.html" is to be generated. * @param profileValue the value of the profile being documented */ public static void generate(ConfigurationImpl configuration, PackageDoc packageDoc, int profileValue) { ProfilePackageFrameWriter profpackgen; try { String profileName = Profile.lookup(profileValue).name; profpackgen = new ProfilePackageFrameWriter(configuration, packageDoc, profileName); StringBuilder winTitle = new StringBuilder(profileName); String sep = " - "; winTitle.append(sep); String pkgName = Util.getPackageName(packageDoc); winTitle.append(pkgName); Content body = profpackgen.getBody(false, profpackgen.getWindowTitle(winTitle.toString())); Content profName = new StringContent(profileName); Content sepContent = new StringContent(sep); Content pkgNameContent = new RawHtml(pkgName); Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar, profpackgen.getTargetProfileLink("classFrame", profName, profileName)); heading.addContent(sepContent); heading.addContent(profpackgen.getTargetProfilePackageLink(packageDoc, "classFrame", pkgNameContent, profileName)); body.addContent(heading); HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.indexContainer); profpackgen.addClassListing(div, profileValue); body.addContent(div); profpackgen.printHtmlDocument( configuration.metakeywords.getMetaKeywords(packageDoc), false, body); profpackgen.close(); } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), DocPaths.PACKAGE_FRAME.getPath()); throw new DocletAbortException(exc); } }
Example 13
Source File: ProfilePackageFrameWriter.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Generate a profile package summary page for the left-hand bottom frame. Construct * the ProfilePackageFrameWriter object and then uses it generate the file. * * @param configuration the current configuration of the doclet. * @param packageDoc The package for which "profilename-package-frame.html" is to be generated. * @param profileValue the value of the profile being documented */ public static void generate(ConfigurationImpl configuration, PackageDoc packageDoc, int profileValue) { ProfilePackageFrameWriter profpackgen; try { String profileName = Profile.lookup(profileValue).name; profpackgen = new ProfilePackageFrameWriter(configuration, packageDoc, profileName); StringBuilder winTitle = new StringBuilder(profileName); String sep = " - "; winTitle.append(sep); String pkgName = Util.getPackageName(packageDoc); winTitle.append(pkgName); Content body = profpackgen.getBody(false, profpackgen.getWindowTitle(winTitle.toString())); Content profName = new StringContent(profileName); Content sepContent = new StringContent(sep); Content pkgNameContent = new RawHtml(pkgName); Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar, profpackgen.getTargetProfileLink("classFrame", profName, profileName)); heading.addContent(sepContent); heading.addContent(profpackgen.getTargetProfilePackageLink(packageDoc, "classFrame", pkgNameContent, profileName)); body.addContent(heading); HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.indexContainer); profpackgen.addClassListing(div, profileValue); body.addContent(div); profpackgen.printHtmlDocument( configuration.metakeywords.getMetaKeywords(packageDoc), false, body); profpackgen.close(); } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), DocPaths.PACKAGE_FRAME.getPath()); throw new DocletAbortException(exc); } }
Example 14
Source File: ProfilePackageFrameWriter.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Generate a profile package summary page for the left-hand bottom frame. Construct * the ProfilePackageFrameWriter object and then uses it generate the file. * * @param configuration the current configuration of the doclet. * @param packageDoc The package for which "profilename-package-frame.html" is to be generated. * @param profileValue the value of the profile being documented */ public static void generate(ConfigurationImpl configuration, PackageDoc packageDoc, int profileValue) { ProfilePackageFrameWriter profpackgen; try { String profileName = Profile.lookup(profileValue).name; profpackgen = new ProfilePackageFrameWriter(configuration, packageDoc, profileName); StringBuilder winTitle = new StringBuilder(profileName); String sep = " - "; winTitle.append(sep); String pkgName = Util.getPackageName(packageDoc); winTitle.append(pkgName); Content body = profpackgen.getBody(false, profpackgen.getWindowTitle(winTitle.toString())); Content profName = new StringContent(profileName); Content sepContent = new StringContent(sep); Content pkgNameContent = new RawHtml(pkgName); Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar, profpackgen.getTargetProfileLink("classFrame", profName, profileName)); heading.addContent(sepContent); heading.addContent(profpackgen.getTargetProfilePackageLink(packageDoc, "classFrame", pkgNameContent, profileName)); body.addContent(heading); HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.indexContainer); profpackgen.addClassListing(div, profileValue); body.addContent(div); profpackgen.printHtmlDocument( configuration.metakeywords.getMetaKeywords(packageDoc), false, body); profpackgen.close(); } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), DocPaths.PACKAGE_FRAME.getPath()); throw new DocletAbortException(exc); } }
Example 15
Source File: ProfilePackageFrameWriter.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Generate a profile package summary page for the left-hand bottom frame. Construct * the ProfilePackageFrameWriter object and then uses it generate the file. * * @param configuration the current configuration of the doclet. * @param packageDoc The package for which "profilename-package-frame.html" is to be generated. * @param profileValue the value of the profile being documented */ public static void generate(ConfigurationImpl configuration, PackageDoc packageDoc, int profileValue) { ProfilePackageFrameWriter profpackgen; try { String profileName = Profile.lookup(profileValue).name; profpackgen = new ProfilePackageFrameWriter(configuration, packageDoc, profileName); StringBuilder winTitle = new StringBuilder(profileName); String sep = " - "; winTitle.append(sep); String pkgName = Util.getPackageName(packageDoc); winTitle.append(pkgName); Content body = profpackgen.getBody(false, profpackgen.getWindowTitle(winTitle.toString())); Content profName = new StringContent(profileName); Content sepContent = new StringContent(sep); Content pkgNameContent = new RawHtml(pkgName); Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar, profpackgen.getTargetProfileLink("classFrame", profName, profileName)); heading.addContent(sepContent); heading.addContent(profpackgen.getTargetProfilePackageLink(packageDoc, "classFrame", pkgNameContent, profileName)); body.addContent(heading); HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.indexContainer); profpackgen.addClassListing(div, profileValue); body.addContent(div); profpackgen.printHtmlDocument( configuration.metakeywords.getMetaKeywords(packageDoc), false, body); profpackgen.close(); } catch (IOException exc) { configuration.standardmessage.error( "doclet.exception_encountered", exc.toString(), DocPaths.PACKAGE_FRAME.getPath()); throw new DocletAbortException(exc); } }
Example 16
Source File: HtmlDoclet.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * {@inheritDoc} */ protected void generateProfileFiles() throws Exception { if (configuration.showProfiles && configuration.profilePackages.size() > 0) { ProfileIndexFrameWriter.generate(configuration); Profile prevProfile = null, nextProfile; String profileName; for (int i = 1; i < configuration.profiles.getProfileCount(); i++) { profileName = Profile.lookup(i).name; // Generate profile package pages only if there are any packages // in a profile to be documented. The profilePackages map will not // contain an entry for the profile if there are no packages to be documented. if (!configuration.shouldDocumentProfile(profileName)) continue; ProfilePackageIndexFrameWriter.generate(configuration, profileName); PackageDoc[] packages = configuration.profilePackages.get( profileName); PackageDoc prev = null, next; for (int j = 0; j < packages.length; j++) { // if -nodeprecated option is set and the package is marked as // deprecated, do not generate the profilename-package-summary.html // and profilename-package-frame.html pages for that package. if (!(configuration.nodeprecated && Util.isDeprecated(packages[j]))) { ProfilePackageFrameWriter.generate(configuration, packages[j], i); next = (j + 1 < packages.length && packages[j + 1].name().length() > 0) ? packages[j + 1] : null; AbstractBuilder profilePackageSummaryBuilder = configuration.getBuilderFactory().getProfilePackageSummaryBuilder( packages[j], prev, next, Profile.lookup(i)); profilePackageSummaryBuilder.build(); prev = packages[j]; } } nextProfile = (i + 1 < configuration.profiles.getProfileCount()) ? Profile.lookup(i + 1) : null; AbstractBuilder profileSummaryBuilder = configuration.getBuilderFactory().getProfileSummaryBuilder( Profile.lookup(i), prevProfile, nextProfile); profileSummaryBuilder.build(); prevProfile = Profile.lookup(i); } } }
Example 17
Source File: HtmlDoclet.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * {@inheritDoc} */ protected void generateProfileFiles() throws Exception { if (configuration.showProfiles && configuration.profilePackages.size() > 0) { ProfileIndexFrameWriter.generate(configuration); Profile prevProfile = null, nextProfile; String profileName; for (int i = 1; i < configuration.profiles.getProfileCount(); i++) { profileName = Profile.lookup(i).name; // Generate profile package pages only if there are any packages // in a profile to be documented. The profilePackages map will not // contain an entry for the profile if there are no packages to be documented. if (!configuration.shouldDocumentProfile(profileName)) continue; ProfilePackageIndexFrameWriter.generate(configuration, profileName); PackageDoc[] packages = configuration.profilePackages.get( profileName); PackageDoc prev = null, next; for (int j = 0; j < packages.length; j++) { // if -nodeprecated option is set and the package is marked as // deprecated, do not generate the profilename-package-summary.html // and profilename-package-frame.html pages for that package. if (!(configuration.nodeprecated && Util.isDeprecated(packages[j]))) { ProfilePackageFrameWriter.generate(configuration, packages[j], i); next = (j + 1 < packages.length && packages[j + 1].name().length() > 0) ? packages[j + 1] : null; AbstractBuilder profilePackageSummaryBuilder = configuration.getBuilderFactory().getProfilePackageSummaryBuilder( packages[j], prev, next, Profile.lookup(i)); profilePackageSummaryBuilder.build(); prev = packages[j]; } } nextProfile = (i + 1 < configuration.profiles.getProfileCount()) ? Profile.lookup(i + 1) : null; AbstractBuilder profileSummaryBuilder = configuration.getBuilderFactory().getProfileSummaryBuilder( Profile.lookup(i), prevProfile, nextProfile); profileSummaryBuilder.build(); prevProfile = Profile.lookup(i); } } }
Example 18
Source File: HtmlDoclet.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * {@inheritDoc} */ protected void generateProfileFiles() throws Exception { if (configuration.showProfiles && configuration.profilePackages.size() > 0) { ProfileIndexFrameWriter.generate(configuration); Profile prevProfile = null, nextProfile; String profileName; for (int i = 1; i < configuration.profiles.getProfileCount(); i++) { profileName = Profile.lookup(i).name; // Generate profile package pages only if there are any packages // in a profile to be documented. The profilePackages map will not // contain an entry for the profile if there are no packages to be documented. if (!configuration.shouldDocumentProfile(profileName)) continue; ProfilePackageIndexFrameWriter.generate(configuration, profileName); PackageDoc[] packages = configuration.profilePackages.get( profileName); PackageDoc prev = null, next; for (int j = 0; j < packages.length; j++) { // if -nodeprecated option is set and the package is marked as // deprecated, do not generate the profilename-package-summary.html // and profilename-package-frame.html pages for that package. if (!(configuration.nodeprecated && Util.isDeprecated(packages[j]))) { ProfilePackageFrameWriter.generate(configuration, packages[j], i); next = (j + 1 < packages.length && packages[j + 1].name().length() > 0) ? packages[j + 1] : null; AbstractBuilder profilePackageSummaryBuilder = configuration.getBuilderFactory().getProfilePackageSummaryBuilder( packages[j], prev, next, Profile.lookup(i)); profilePackageSummaryBuilder.build(); prev = packages[j]; } } nextProfile = (i + 1 < configuration.profiles.getProfileCount()) ? Profile.lookup(i + 1) : null; AbstractBuilder profileSummaryBuilder = configuration.getBuilderFactory().getProfileSummaryBuilder( Profile.lookup(i), prevProfile, nextProfile); profileSummaryBuilder.build(); prevProfile = Profile.lookup(i); } } }
Example 19
Source File: SarlDoclet.java From sarl with Apache License 2.0 | 4 votes |
@Override protected void generateProfileFiles() throws Exception { if (configuration().showProfiles && configuration().profilePackages.size() > 0) { ProfileIndexFrameWriter.generate(configuration()); Profile prevProfile = null; Profile nextProfile; String profileName; for (int i = 1; i < configuration().profiles.getProfileCount(); i++) { profileName = Profile.lookup(i).name; // Generate profile package pages only if there are any packages // in a profile to be documented. The profilePackages map will not // contain an entry for the profile if there are no packages to be documented. if (!configuration().shouldDocumentProfile(profileName)) { continue; } ProfilePackageIndexFrameWriter.generate(configuration(), profileName); final PackageDoc[] packages = configuration().profilePackages.get(profileName); PackageDoc prev = null; PackageDoc next; for (int j = 0; j < packages.length; j++) { // if -nodeprecated option is set and the package is marked as // deprecated, do not generate the profilename-package-summary.html // and profilename-package-frame.html pages for that package. if (!(configuration().nodeprecated && Util.isDeprecated(packages[j]))) { ProfilePackageFrameWriter.generate(configuration(), packages[j], i); if ((j + 1 < packages.length) && (packages[j + 1].name().length() > 0)) { next = packages[j + 1]; } else { next = null; } final AbstractBuilder profilePackageSummaryBuilder = configuration() .getBuilderFactory().getProfilePackageSummaryBuilder( packages[j], prev, next, Profile.lookup(i)); profilePackageSummaryBuilder.build(); prev = packages[j]; } } nextProfile = (i + 1) < configuration().profiles.getProfileCount() ? Profile.lookup(i + 1) : null; final AbstractBuilder profileSummaryBuilder = configuration() .getBuilderFactory().getProfileSummaryBuilder( Profile.lookup(i), prevProfile, nextProfile); profileSummaryBuilder.build(); prevProfile = Profile.lookup(i); } } }
Example 20
Source File: HtmlDoclet.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * {@inheritDoc} */ protected void generateProfileFiles() throws Exception { if (configuration.showProfiles && configuration.profilePackages.size() > 0) { ProfileIndexFrameWriter.generate(configuration); Profile prevProfile = null, nextProfile; String profileName; for (int i = 1; i < configuration.profiles.getProfileCount(); i++) { profileName = Profile.lookup(i).name; // Generate profile package pages only if there are any packages // in a profile to be documented. The profilePackages map will not // contain an entry for the profile if there are no packages to be documented. if (!configuration.shouldDocumentProfile(profileName)) continue; ProfilePackageIndexFrameWriter.generate(configuration, profileName); PackageDoc[] packages = configuration.profilePackages.get( profileName); PackageDoc prev = null, next; for (int j = 0; j < packages.length; j++) { // if -nodeprecated option is set and the package is marked as // deprecated, do not generate the profilename-package-summary.html // and profilename-package-frame.html pages for that package. if (!(configuration.nodeprecated && Util.isDeprecated(packages[j]))) { ProfilePackageFrameWriter.generate(configuration, packages[j], i); next = (j + 1 < packages.length && packages[j + 1].name().length() > 0) ? packages[j + 1] : null; AbstractBuilder profilePackageSummaryBuilder = configuration.getBuilderFactory().getProfilePackageSummaryBuilder( packages[j], prev, next, Profile.lookup(i)); profilePackageSummaryBuilder.build(); prev = packages[j]; } } nextProfile = (i + 1 < configuration.profiles.getProfileCount()) ? Profile.lookup(i + 1) : null; AbstractBuilder profileSummaryBuilder = configuration.getBuilderFactory().getProfileSummaryBuilder( Profile.lookup(i), prevProfile, nextProfile); profileSummaryBuilder.build(); prevProfile = Profile.lookup(i); } } }