mirror of
https://github.com/apache/ant.git
synced 2025-05-18 14:04:48 +00:00
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273543 13f79535-47bb-0310-9956-ffa450edef68
168 lines
6.3 KiB
HTML
168 lines
6.3 KiB
HTML
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Language" content="en-us">
|
|
<title>IContract Task</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.<br>
|
|
The task can generate a properties file for <a href="http://home.sol.no/~hellesoy/icplus.html">iControl</a>,
|
|
a graphical user interface that lets you turn on/off assertions. iControl generates a control file that you can refer to
|
|
from this task using the controlfile attribute.
|
|
</p>
|
|
|
|
<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 source 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 source files should go.</td>
|
|
<td valign="top" align="center">Yes</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">builddir</td>
|
|
<td valign="top">Indicates where the compiled instrumented classes should go.
|
|
Defaults to the value of instrumentdir.
|
|
<em>NOTE:</em> Don't use the same directory for compiled instrumented classes
|
|
and uninstrumented classes. It will break the dependency checking. (Classes will
|
|
not be reinstrumented if you change them).</td>
|
|
<td valign="top" align="center">No</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">repbuilddir</td>
|
|
<td valign="top">Indicates where the compiled repository classes should go.
|
|
Defaults to the value of repositorydir.</td>
|
|
<td valign="top" align="center">No</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">pre</td>
|
|
<td valign="top">Indicates whether or not to instrument for preconditions.
|
|
Defaults to <code>true</code> unless controlfile is specified, in which case it
|
|
defaults to <code>false</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> unless controlfile is specified, in which case it
|
|
defaults to <code>false</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> unless controlfile is specified, in which case it
|
|
defaults to <code>false</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">verbosity</td>
|
|
<td valign="top">Indicates the verbosity level of iContract. Any combination
|
|
of <code>error*,warning*,note*,info*,progress*,debug*</code> (comma separated) can be
|
|
used. Defaults to <code>error*</code></td>
|
|
<td valign="top" align="center">No</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">quiet</td>
|
|
<td valign="top">Indicates if iContract should be quiet. Turn it off if many your classes extend uninstrumented classes
|
|
and you don't want warnings about this. Defaults to <code>false</code></td>
|
|
<td valign="top" align="center">No</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">updateicontrol</td>
|
|
<td valign="top">If set to true, it indicates that the properties file for
|
|
iControl in the current directory should be updated (or created if it doesn't exist).
|
|
Defaults to <code>false</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. Consider using iControl to generate the file.
|
|
Default is not to pass a file. </td>
|
|
<td valign="top" align="center">Only if <code>updateicontrol=true</code></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">classdir</td>
|
|
<td valign="top">Indicates where compiled (unistrumented) classes are located.
|
|
This is required in order to properly update the icontrol.properties file, not
|
|
for instrumentation.</td>
|
|
<td valign="top" align="center">Only if <code>updateicontrol=true</code></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">targets</td>
|
|
<td valign="top">Name of the file that will be generated by this task, which lists all the
|
|
classes that iContract will instrument. If specified, the file will not be deleted after execution.
|
|
If not specified, a file will still be created, but it will be deleted after execution.</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 of the Javac task for
|
|
more information. Nested includes and excludes are also supported.</p>
|
|
|
|
<p><b>Example:</b></p>
|
|
|
|
<p>
|
|
<b>Note:</b> iContract will use the java compiler indicated by the project's
|
|
<code>build.compiler</code> property. See documentation of the Javac task for
|
|
more information.</p>
|
|
<p>
|
|
Nested includes and excludes can be done very much the same way as any subclass
|
|
of MatchingTask.</p>
|
|
|
|
<p><b>Example:</b></p>
|
|
|
|
<pre>
|
|
<icontract
|
|
srcdir="${build.src}"
|
|
instrumentdir="${build.instrument}"
|
|
repositorydir="${build.repository}"
|
|
builddir="${build.instrclasses}"
|
|
updateicontrol="true"
|
|
classdir="${build.classes}"
|
|
controlfile="control"
|
|
targets="targets"
|
|
verbosity="error*,warning*"
|
|
quiet="true"
|
|
>
|
|
<classpath refid="compile-classpath"/>
|
|
</icontract>
|
|
</pre>
|
|
|
|
<hr>
|
|
<p align="center">Copyright © 2001-2002 Apache Software Foundation. All rights
|
|
Reserved.</p>
|
|
|
|
</body>
|
|
</html>
|
|
|