本文整理汇总了Java中org.jacoco.core.analysis.IBundleCoverage类的典型用法代码示例。如果您正苦于以下问题:Java IBundleCoverage类的具体用法?Java IBundleCoverage怎么用?Java IBundleCoverage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IBundleCoverage类属于org.jacoco.core.analysis包,在下文中一共展示了IBundleCoverage类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: execute
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
/**
* Create the report.
*
* @throws IOException
*/
public void execute() throws IOException {
// Read the jacoco.exec file. Multiple data stores could be merged
// at this point
loadExecutionData();
// Run the structure analyzer on a single class folder to build up
// the coverage model. The process would be similar if your classes
// were in a jar file. Typically you would create a bundle for each
// class folder and each jar you want in your report. If you have
// more than one bundle you will need to add a grouping node to your
// report
final IBundleCoverage bundleCoverage = analyzeStructure();
if (reportDirectory != null) {
createHtmlReport(bundleCoverage);
}
if (xmlOutput != null) {
createXmlReport(bundleCoverage);
}
}
开发者ID:GITNE,项目名称:icedtea-web,代码行数:28,代码来源:ReportGenerator.java
示例2: printCoverage
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
private void printCoverage(IBundleCoverage coverage) {
ICoveragePrintable printer =
new CoverageJsonPrinter(coverage, printManager.jsonOut(),
printManager.isPrettyPrint(), printManager.format());
PrintStream out = printManager.jsonOut();
if(count == 0) {
out.print('[');
}
printer.printCoverage();
if(this.coverageTitle == null
|| this.coverageTitle.isEmpty()
|| this.coverageTitle.equals("end")) {
out.print("]");
} else {
out.println(",");
}
System.out.printf("completed printing coverage bundle for %s.%n", coverage.getName());
System.out.printf("completed printing %d coverage bundle(s).%n%n", ++count);
}
开发者ID:spideruci,项目名称:tacoco,代码行数:20,代码来源:ExecutionDataParser.java
示例3: create
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
/**
* Create the report.
*
* @throws IOException
*/
public void create() throws IOException {
// Read the jacoco.exec file. Multiple data files could be merged
// at this point
loadExecutionData();
// Run the structure analyzer on a single class folder to build up
// the coverage model. The process would be similar if your classes
// were in a jar file. Typically you would create a bundle for each
// class folder and each jar you want in your report. If you have
// more than one bundle you will need to add a grouping node to your
// report
final IBundleCoverage bundleCoverage = analyzeStructure();
createReport(bundleCoverage);
}
开发者ID:spideruci,项目名称:tacoco,代码行数:22,代码来源:ReportGenerator.java
示例4: createReport
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
private void createReport(final IBundleCoverage bundleCoverage)
throws IOException {
final IReportVisitor visitor = createVisitor(Locale.getDefault());
// Initialize the report with all of the execution and session
// information.
visitor.visitInfo(execFileLoader.getSessionInfoStore().getInfos(),
execFileLoader.getExecutionDataStore().getContents());
// Populate the report structure with the bundle coverage information.
// Call visitGroup if you need groups in your report.
visitor.visitBundle(bundleCoverage, new DirectorySourceFileLocator(sourceDirectory, OUTPUT_ENCODING, 4));
// visitor.visitGroup("AS");
// Signal end of structure information to allow report to write all
// information out
visitor.visitEnd();
}
开发者ID:wso2,项目名称:carbon-platform-integration,代码行数:20,代码来源:ReportGenerator.java
示例5: create
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
/**
* Create the report.
*
* @throws IOException
*/
public void create() throws IOException {
// Read the jacoco.exec file. Multiple data files could be merged
// at this point
loadExecutionData();
// Run the structure analyzer on a single class folder to build up
// the coverage model. The process would be similar if your classes
// were in a jar file. Typically you would create a bundle for each
// class folder and each jar you want in your report. If you have
// more than one bundle you will need to add a grouping node to your
// report
final IBundleCoverage bundleCoverage = analyzeStructure();
createReport(bundleCoverage);
}
开发者ID:resios,项目名称:jacoco-coverage,代码行数:23,代码来源:ReportGenerator.java
示例6: analyzeStructure
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
@VisibleForTesting
IBundleCoverage analyzeStructure() throws IOException {
final CoverageBuilder coverageBuilder = new CoverageBuilder();
final Analyzer analyzer = new Analyzer(execFileLoader.getExecutionDataStore(), coverageBuilder);
Set<String> alreadyInstrumentedClasses = new HashSet<>();
for (File classesJar : classesJars) {
if (isNewCoverageImplementation) {
analyzeUninstrumentedClassesFromJar(analyzer, classesJar, alreadyInstrumentedClasses);
} else {
analyzer.analyzeAll(classesJar);
}
}
// TODO(bazel-team): Find out where the name of the bundle can pop out in the report.
return coverageBuilder.getBundle("isthisevenused");
}
开发者ID:bazelbuild,项目名称:bazel,代码行数:17,代码来源:JacocoCoverageRunner.java
示例7: create
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
/**
* Create the report.
*
* @throws IOException
*/
public void create() throws IOException {
// Read the jacoco.exec file. Multiple data files could be merged
// at this point
loadExecutionData();
// Run the structure analyzer on a single class folder to build up
// the coverage model. The process would be similar if your classes
// were in a jar file. Typically you would create a bundle for each
// class folder and each jar you want in your report. If you have
// more than one bundle you will need to add a grouping node to your
// report
final IBundleCoverage bundleCoverage = analyzeStructure();
createReport(bundleCoverage);
}
开发者ID:saleehk,项目名称:buck-cutom,代码行数:23,代码来源:ReportGenerator.java
示例8: processNBModule
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
public void processNBModule(String projectName, List<String> classDirectories, List<String> sourceDirectories) throws IOException {
CoverageBuilder coverageBuilder = new CoverageBuilder();
Analyzer analyzer = new Analyzer(execFileLoader.getExecutionDataStore(), coverageBuilder);
for (String classDirectory : classDirectories) {
analyzer.analyzeAll(new File(classDirectory));
}
IBundleCoverage bundleCoverage = coverageBuilder.getBundle(projectName);
MultiSourceFileLocator sourceLocator = new MultiSourceFileLocator(4);
for (String sourceDirectory : sourceDirectories) {
sourceLocator.add(new DirectorySourceFileLocator(new File(sourceDirectory), DEF_ENCODING, 4));
}
groupVisitor.visitBundle(bundleCoverage, sourceLocator);
}
开发者ID:jonathanlermitage,项目名称:tikione-jacocoverage,代码行数:18,代码来源:JacocoNBModuleReportGenerator.java
示例9: create
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
/**
* Create the report.
*
* @throws IOException
*/
public void create() throws IOException {
// Read the jacoco.exec file. Multiple data files could be merged
// at this point
loadExecutionData();
// Run the structure analyzer on a single class folder to build up
// the coverage model. The process would be similar if your classes
// were in a jar file. Typically you would create a bundle for each
// class folder and each jar you want in your report. If you have
// more than one bundle you will need to add a grouping node to your
// report
final IBundleCoverage bundleCoverage = analyzeStructure();
createReport(bundleCoverage);
}
开发者ID:facebook,项目名称:buck,代码行数:22,代码来源:ReportGenerator.java
示例10: analyzeStructure
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
private IBundleCoverage analyzeStructure() throws IOException {
final CoverageBuilder coverageBuilder = new CoverageBuilder();
final Analyzer analyzer = new Analyzer(execFileLoader.getExecutionDataStore(), coverageBuilder);
String[] classesDirs = classesPath.split(":");
for (String classesDir : classesDirs) {
File classesDirFile = new File(classesDir);
if (classesDirFile.exists()) {
for (File clazz : FileUtils.getFiles(classesDirFile, coverageIncludes, coverageExcludes)) {
analyzer.analyzeAll(clazz);
}
}
}
return coverageBuilder.getBundle(title);
}
开发者ID:facebook,项目名称:buck,代码行数:17,代码来源:ReportGenerator.java
示例11: createReport
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
private void createReport(IProgressMonitor monitor) throws CoreException,
IOException {
final int work = session.getScope().size();
monitor.beginTask(
NLS.bind(CoreMessages.ExportingSession_task, session.getDescription()),
work * 2);
final SessionAnalyzer analyzer = new SessionAnalyzer();
final IJavaModelCoverage modelCoverage = analyzer.processSession(session,
new SubProgressMonitor(monitor, work));
final IReportVisitor formatter = createFormatter();
formatter
.visitInfo(analyzer.getSessionInfos(), analyzer.getExecutionData());
final IReportGroupVisitor modelgroup = formatter.visitGroup(session
.getDescription());
for (IJavaProject project : modelCoverage.getProjects()) {
final IReportGroupVisitor projectgroup = modelgroup.visitGroup(project
.getElementName());
for (IPackageFragmentRoot root : project.getPackageFragmentRoots()) {
final IBundleCoverage coverage = (IBundleCoverage) modelCoverage
.getCoverageFor(root);
if (coverage != null) {
projectgroup.visitBundle(coverage, createSourceFileLocator(root));
monitor.worked(1);
}
}
}
formatter.visitEnd();
monitor.done();
}
开发者ID:eclipse,项目名称:eclemma,代码行数:30,代码来源:SessionExporter.java
示例12: processPackageFragmentRoot
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
private void processPackageFragmentRoot(IPackageFragmentRoot root,
PackageFragementRootAnalyzer analyzer, IProgressMonitor monitor)
throws CoreException {
final TypeVisitor visitor = new TypeVisitor(analyzer.analyze(root));
new TypeTraverser(root).process(visitor, monitor);
final IBundleCoverage bundle = new BundleCoverageImpl(getName(root),
visitor.getClasses(), visitor.getSources());
modelcoverage.putFragmentRoot(root, bundle);
putPackages(bundle.getPackages(), root);
}
开发者ID:eclipse,项目名称:eclemma,代码行数:12,代码来源:SessionAnalyzer.java
示例13: createHtmlReport
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
private void createHtmlReport(final IBundleCoverage bundleCoverage)
throws IOException {
// Create a concrete report visitor based on some supplied
// configuration. In this case we use the defaults
final HTMLFormatter htmlFormatter = new HTMLFormatter();
final IReportVisitor visitor = htmlFormatter.createVisitor(new FileMultiReportOutput(reportDirectory));
// Initialize the report with all of the execution and session
// information. At this point the report doesn't know about the
// structure of the report being created
visitor.visitInfo(sessionInfoStore.getInfos(),
executionDataStore.getContents());
// Populate the report structure with the bundle coverage information.
// Call visitGroup if you need groups in your report.
MultiSourceFileLocator msf = new MultiSourceFileLocator(4);
for (File file : sourceDirectories) {
msf.add(new DirectorySourceFileLocator(
file, "utf-8", 4));
}
visitor.visitBundle(bundleCoverage, msf);
// Signal end of structure information to allow report to write all
// information out
visitor.visitEnd();
}
开发者ID:GITNE,项目名称:icedtea-web,代码行数:30,代码来源:ReportGenerator.java
示例14: createXmlReport
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
private void createXmlReport(final IBundleCoverage bundleCoverage)
throws IOException {
OutputStream fos = new FileOutputStream(xmlOutput);
try {
// Create a concrete report visitor based on some supplied
// configuration. In this case we use the defaults
final XMLFormatter htmlFormatter = new XMLFormatter();
final IReportVisitor visitor = htmlFormatter.createVisitor(fos);
// Initialize the report with all of the execution and session
// information. At this point the report doesn't know about the
// structure of the report being created
visitor.visitInfo(sessionInfoStore.getInfos(),
executionDataStore.getContents());
// Populate the report structure with the bundle coverage information.
// Call visitGroup if you need groups in your report.
visitor.visitBundle(bundleCoverage, null);
// Signal end of structure information to allow report to write all
// information out
visitor.visitEnd();
} finally {
if (fos != null) {
fos.close();
}
}
}
开发者ID:GITNE,项目名称:icedtea-web,代码行数:32,代码来源:ReportGenerator.java
示例15: analyzeStructure
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
private IBundleCoverage analyzeStructure() throws IOException {
final CoverageBuilder coverageBuilder = new CoverageBuilder();
final Analyzer analyzer = new Analyzer(executionDataStore,
coverageBuilder);
for (File file : classesDirectories) {
analyzer.analyzeAll(file);
}
return coverageBuilder.getBundle(title);
}
开发者ID:GITNE,项目名称:icedtea-web,代码行数:12,代码来源:ReportGenerator.java
示例16: analyzeStructure
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
private IBundleCoverage analyzeStructure(final ExecutionDataStore data)
throws IOException {
final CoverageBuilder coverageBuilder = new CoverageBuilder();
final Analyzer analyzer = new Analyzer(data, coverageBuilder);
analyzer.analyzeAll(classesDirectory);
return coverageBuilder.getBundle(coverageTitle);
}
开发者ID:spideruci,项目名称:tacoco,代码行数:8,代码来源:ExecutionDataParser.java
示例17: CoverageJsonPrinter
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
public CoverageJsonPrinter(IBundleCoverage coverage, PrintStream out,
boolean pretty, LineCoverageFormat format) {
this.coverage = coverage;
this.out = out;
GsonBuilder gsonBuilder = new GsonBuilder();
if(pretty) {
gsonBuilder.setPrettyPrinting();
}
gson = gsonBuilder.create();
this.format = format;
}
开发者ID:spideruci,项目名称:tacoco,代码行数:12,代码来源:CoverageJsonPrinter.java
示例18: createReport
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
private void createReport(final IBundleCoverage bundleCoverage)
throws IOException {
// Create a concrete report visitor based on some supplied
// configuration. In this case we use the defaults
final HTMLFormatter htmlFormatter = new HTMLFormatter();
final IReportVisitor visitor = htmlFormatter
.createVisitor(new FileMultiReportOutput(reportDirectory));
// Initialize the report with all of the execution and session
// information. At this point the report doesn't know about the
// structure of the report being created
visitor.visitInfo(execFileLoader.getSessionInfoStore().getInfos(),
execFileLoader.getExecutionDataStore().getContents());
// Populate the report structure with the bundle coverage information.
// Call visitGroup if you need groups in your report.
visitor.visitBundle(bundleCoverage, new DirectorySourceFileLocator(
sourceDirectory, "utf-8", 4));
// Signal end of structure information to allow report to write all
// information out
visitor.visitEnd();
}
开发者ID:spideruci,项目名称:tacoco,代码行数:28,代码来源:ReportGenerator.java
示例19: analyzeStructure
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
private IBundleCoverage analyzeStructure() throws IOException {
final CoverageBuilder coverageBuilder = new CoverageBuilder();
final Analyzer analyzer = new Analyzer(
execFileLoader.getExecutionDataStore(), coverageBuilder);
analyzer.analyzeAll(classesDirectory);
return coverageBuilder.getBundle(title);
}
开发者ID:spideruci,项目名称:tacoco,代码行数:10,代码来源:ReportGenerator.java
示例20: SQLitePrinter
import org.jacoco.core.analysis.IBundleCoverage; //导入依赖的package包/类
public SQLitePrinter(IBundleCoverage coverage,
DBUtil dbUtil, int projectID, boolean updateSourceInfo) {
this.coverage = coverage;
GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.setPrettyPrinting();
gson = gsonBuilder.create();
this.db = dbUtil;
this.projectID = projectID;
this.updateSourceInfo = updateSourceInfo;
}
开发者ID:spideruci,项目名称:tacoco,代码行数:12,代码来源:SQLitePrinter.java
注:本文中的org.jacoco.core.analysis.IBundleCoverage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论