ant/docs/manual/OptionalTasks/icontract.html

111 lines
3.4 KiB
HTML
Raw Normal View History

<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Ant User Manual</title>
</head>
<body>
<h2><a name="icontract">icontract</a></h2>
<h3>Description</h3>
<p>Instruments Java classes with <a href="http://www.reliable-systems.com/tools/">iContract</a>
DBC preprocessor.
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">srcdir</td>
<td valign="top">Location of the java files</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">instrumentdir</td>
<td valign="top">Indicates where the instrumented java and class files
should go</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">repositorydir</td>
<td valign="top">Indicates where the repository java and class files should
go</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">pre</td>
<td valign="top">Indicates whether or not to instrument for preconditions.
Defaults to <code>true</code></td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">post</td>
<td valign="top">Indicates whether or not to instrument for postconditions.
Defaults to <code>true</code></td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">invariant</td>
<td valign="top">Indicates whether or not to instrument for invariants.
Defaults to <code>true</code></td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">failthrowable</td>
<td valign="top">The full name of the Throwable (Exception) that should be
thrown when an assertion is violated. Defaults to <code>java.lang.Error</code></td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">controlfile</td>
<td valign="top">The name of the control file to pass to iContract. Default
is to not pass a file</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">verbosity</td>
<td valign="top">Indicates the verbosity level of iContract. Any combination
of error*,warning*,note*,info*,progress*,debug* (comma separated) can be
used. Defaults to <code>error*,warning*</code></td>
<td valign="top" align="center">No</td>
</tr>
</table>
<p/>
<b>Note:</b> iContract will use the java compiler indicated by the project's
<code>build.compiler</code> property. See documentation for the Javac task for
more information.
<p><b>Example:</b></p>
<pre>
&lt;!-- =================================================================== -->
&lt;!-- Instruments source codes with iContract -->
&lt;!-- =================================================================== -->
&lt;target name="instrument" depends="compile">
&lt;icontract
srcdir="${build.src}"
instrumentdir="${instrumented.dir}"
repositorydir="${repository.dir}"
>
&lt;classpath>
&lt;fileset dir="./lib">
&lt;include name="*.jar"/>
&lt;/fileset>
&lt;/classpath>
&lt;/icontract>
&lt;/target>
</pre>
<hr>
<p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights
Reserved.</p>
</body>
</html>