当前位置: 首页>>代码示例>>Java>>正文


Java Profiles.getProfileCount方法代码示例

本文整理汇总了Java中com.sun.tools.javac.sym.Profiles.getProfileCount方法的典型用法代码示例。如果您正苦于以下问题:Java Profiles.getProfileCount方法的具体用法?Java Profiles.getProfileCount怎么用?Java Profiles.getProfileCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.tools.javac.sym.Profiles的用法示例。


在下文中一共展示了Profiles.getProfileCount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addProfilesList

import com.sun.tools.javac.sym.Profiles; //导入方法依赖的package包/类
/**
 * {@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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:ProfileIndexFrameWriter.java

示例2: addIndexContents

import com.sun.tools.javac.sym.Profiles; //导入方法依赖的package包/类
/**
 * Adds profile index contents. Call appropriate methods from
 * the sub-classes. Adds it to the body HtmlTree
 *
 * @param profiles profiles to be documented
 * @param text string which will be used as the heading
 * @param tableSummary summary for the table
 * @param body the document tree to which the index contents will be added
 */
protected void addIndexContents(Profiles profiles, String text,
        String tableSummary, Content body) {
    if (profiles.getProfileCount() > 0) {
        HtmlTree div = new HtmlTree(HtmlTag.DIV);
        div.addStyle(HtmlStyle.indexHeader);
        addAllClassesLink(div);
        addAllPackagesLink(div);
        body.addContent(div);
        addProfilesList(profiles, text, tableSummary, body);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:AbstractProfileIndexWriter.java

示例3: checkProfile

import com.sun.tools.javac.sym.Profiles; //导入方法依赖的package包/类
void checkProfile(File profileDesc, String base) throws IOException {
    Profiles p = Profiles.read(profileDesc);
    for (int i = 0; i < p.getProfileCount(); i++) {
        System.err.println(p.getPackages(i));
        for (String pkg: p.getPackages(i)) {
            if (!pkg.endsWith(base))
                error("unexpected package " + pkg + " for profile " + i);
        }
    }
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:11,代码来源:ProfileTest.java


注:本文中的com.sun.tools.javac.sym.Profiles.getProfileCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。