blob: bf5f996ca61004ea99733014e1ba1979bccd38ac [file] [log] [blame]
Marc R. Hoffmanne571f3f2012-05-13 12:18:02 +00001<?xml version="1.0" encoding="UTF-8" ?>
Evgeny Mandrikov82a92ca2012-01-15 20:25:48 +00002<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
4<head>
Marc R. Hoffmanne571f3f2012-05-13 12:18:02 +00005 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <link rel="stylesheet" href=".resources/doc.css" charset="UTF-8" type="text/css" />
Evgeny Mandrikov82a92ca2012-01-15 20:25:48 +00007 <link rel="shortcut icon" href=".resources/report.gif" type="image/gif" />
8 <title>JaCoCo - API Usage Examples</title>
9</head>
10<body>
11
12<div class="breadcrumb">
13 <a href="../index.html" class="el_report">JaCoCo</a> &gt;
14 <a href="index.html" class="el_group">Documentation</a> &gt;
15 <span class="el_source">API Usage Examples</span>
16</div>
17<div id="content">
18
19<h1>API Usage Examples</h1>
20
21<p>
22 To get familiar with the API these examples demonstrate different aspects of
23 the JaCoCo API. Each example can be separately compiled and executed as a Java
24 main program. Some examples require additional command line arguments.
25</p>
26
Marc R. Hoffmann7a3806c2013-10-04 07:22:39 +020027<p>
28 To compile and run these example you need
29 <a href="http://asm.ow2.org/">ASM</a> @asm.version@ in addition to the JaCoCo
30 libraries.
31</p>
32
Evgeny Mandrikov82a92ca2012-01-15 20:25:48 +000033<table class="coverage">
34 <thead>
35 <tr>
36 <td>File</td>
37 <td>Description</td>
38 </tr>
39 </thead>
40 <tbody>
41 <tr>
42 <td><a class="el_source" href="examples/java/CoreTutorial.java">CoreTutorial.java</a></td>
43 <td>This tutorial-like example instruments, executes and analyzes a single
44 target class. Finally line coverage information is printed to the
45 console.
46 </td>
47 </tr>
48 <tr>
49 <td><a class="el_source" href="examples/java/ClassInfo.java">ClassInfo.java</a></td>
50 <td>This example writes JaCoCo specific information for given Java class
51 files.
52 </td>
53 </tr>
54 <tr>
55 <td><a class="el_source" href="examples/java/ExecDump.java">ExecDump.java</a></td>
56 <td>Utility to dump the content of execution data files in readable form.
57 </td>
58 </tr>
59 <tr>
60 <td><a class="el_source" href="examples/java/MBeanClient.java">MBeanClient.java</a></td>
61 <td>This example connects to a coverage agent to collect execution data
62 over the JMX.
63 </td>
64 </tr>
65 <tr>
66 <td><a class="el_source" href="examples/java/ExecutionDataClient.java">ExecutionDataClient.java</a></td>
67 <td>This example connects to a coverage agent to collect execution data
68 over the remote protocol.
69 </td>
70 </tr>
71 <tr>
72 <td><a class="el_source" href="examples/java/ExecutionDataServer.java">ExecutionDataServer.java</a></td>
73 <td>This example starts a socket server to collect execution data from
74 agents over the remote protocol.
75 </td>
76 </tr>
77 <tr>
78 <td><a class="el_source" href="examples/java/ReportGenerator.java">ReportGenerator.java</a></td>
79 <td>This example generates HTML reports based on a simple project layout and well known execution
80 data store file name.</td>
81 </tr>
82 </tbody>
83</table>
84
85
86</div>
87<div class="footer">
88 <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
89 <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
90</div>
91
92</body>
93</html>