本文整理汇总了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);
}
示例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);
}
}
示例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);
}
}
}