1 | <html>
|
---|
2 |
|
---|
3 | <head>
|
---|
4 | <meta http-equiv="Content-Language" content="en-us">
|
---|
5 | <title>IContract Task</title>
|
---|
6 | <link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
|
---|
7 | </head>
|
---|
8 |
|
---|
9 | <body>
|
---|
10 |
|
---|
11 | <h2><a name="icontract">icontract</a></h2>
|
---|
12 | <h3>Description</h3>
|
---|
13 |
|
---|
14 | <P>
|
---|
15 | Instruments Java classes with <a href="http://www.reliable-systems.com/tools/">iContract</a>
|
---|
16 | DBC preprocessor.<br>
|
---|
17 | The task can generate a properties file for <a href="http://home.sol.no/~hellesoy/icplus.html">iControl</a>,
|
---|
18 | a graphical user interface that lets you turn on/off assertions. iControl generates a control file that you can refer to
|
---|
19 | from this task using the controlfile attribute.
|
---|
20 | </p>
|
---|
21 |
|
---|
22 | <h3>Parameters</h3>
|
---|
23 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
24 | <tr>
|
---|
25 | <td valign="top"><b>Attribute</b></td>
|
---|
26 | <td valign="top"><b>Description</b></td>
|
---|
27 | <td align="center" valign="top"><b>Required</b></td>
|
---|
28 | </tr>
|
---|
29 | <tr>
|
---|
30 | <td valign="top">srcdir</td>
|
---|
31 | <td valign="top">Location of the java files.</td>
|
---|
32 | <td valign="top" align="center">Yes</td>
|
---|
33 | </tr>
|
---|
34 | <tr>
|
---|
35 | <td valign="top">instrumentdir</td>
|
---|
36 | <td valign="top">Indicates where the instrumented source files should go.</td>
|
---|
37 | <td valign="top" align="center">Yes</td>
|
---|
38 | </tr>
|
---|
39 | <tr>
|
---|
40 | <td valign="top">repositorydir</td>
|
---|
41 | <td valign="top">Indicates where the repository source files should go.</td>
|
---|
42 | <td valign="top" align="center">Yes</td>
|
---|
43 | </tr>
|
---|
44 | <tr>
|
---|
45 | <td valign="top">builddir</td>
|
---|
46 | <td valign="top">Indicates where the compiled instrumented classes should go.
|
---|
47 | Defaults to the value of instrumentdir.
|
---|
48 | <em>NOTE:</em> Don't use the same directory for compiled instrumented classes
|
---|
49 | and uninstrumented classes. It will break the dependency checking. (Classes will
|
---|
50 | not be reinstrumented if you change them).</td>
|
---|
51 | <td valign="top" align="center">No</td>
|
---|
52 | </tr>
|
---|
53 | <tr>
|
---|
54 | <td valign="top">repbuilddir</td>
|
---|
55 | <td valign="top">Indicates where the compiled repository classes should go.
|
---|
56 | Defaults to the value of repositorydir.</td>
|
---|
57 | <td valign="top" align="center">No</td>
|
---|
58 | </tr>
|
---|
59 | <tr>
|
---|
60 | <td valign="top">pre</td>
|
---|
61 | <td valign="top">Indicates whether or not to instrument for preconditions.
|
---|
62 | Defaults to <code>true</code> unless controlfile is specified, in which case it
|
---|
63 | defaults to <code>false</code>.</td>
|
---|
64 | <td valign="top" align="center">No</td>
|
---|
65 | </tr>
|
---|
66 | <tr>
|
---|
67 | <td valign="top">post</td>
|
---|
68 | <td valign="top">Indicates whether or not to instrument for postconditions.
|
---|
69 | Defaults to <code>true</code> unless controlfile is specified, in which case it
|
---|
70 | defaults to <code>false</code>.</td>
|
---|
71 | <td valign="top" align="center">No</td>
|
---|
72 | </tr>
|
---|
73 | <tr>
|
---|
74 | <td valign="top">invariant</td>
|
---|
75 | <td valign="top">Indicates whether or not to instrument for invariants.
|
---|
76 | Defaults to <code>true</code> unless controlfile is specified, in which case it
|
---|
77 | defaults to <code>false</code>.</td>
|
---|
78 | <td valign="top" align="center">No</td>
|
---|
79 | </tr>
|
---|
80 | <tr>
|
---|
81 | <td valign="top">failthrowable</td>
|
---|
82 | <td valign="top">The full name of the Throwable (Exception) that should be
|
---|
83 | thrown when an assertion is violated. Defaults to <code>java.lang.Error</code></td>
|
---|
84 | <td valign="top" align="center">No</td>
|
---|
85 | </tr>
|
---|
86 | <tr>
|
---|
87 | <td valign="top">verbosity</td>
|
---|
88 | <td valign="top">Indicates the verbosity level of iContract. Any combination
|
---|
89 | of <code>error*,warning*,note*,info*,progress*,debug*</code> (comma separated) can be
|
---|
90 | used. Defaults to <code>error*</code></td>
|
---|
91 | <td valign="top" align="center">No</td>
|
---|
92 | </tr>
|
---|
93 | <tr>
|
---|
94 | <td valign="top">quiet</td>
|
---|
95 | <td valign="top">Indicates if iContract should be quiet. Turn it off if many your classes extend uninstrumented classes
|
---|
96 | and you don't want warnings about this. Defaults to <code>false</code></td>
|
---|
97 | <td valign="top" align="center">No</td>
|
---|
98 | </tr>
|
---|
99 | <tr>
|
---|
100 | <td valign="top">updateicontrol</td>
|
---|
101 | <td valign="top">If set to true, it indicates that the properties file for
|
---|
102 | iControl in the current directory should be updated (or created if it doesn't exist).
|
---|
103 | Defaults to <code>false</code>.</td>
|
---|
104 | <td valign="top" align="center">No</td>
|
---|
105 | </tr>
|
---|
106 | <tr>
|
---|
107 | <td valign="top">controlfile</td>
|
---|
108 | <td valign="top">The name of the control file to pass to iContract. Consider using iControl to generate the file.
|
---|
109 | Default is not to pass a file. </td>
|
---|
110 | <td valign="top" align="center">Only if <code>updateicontrol=true</code></td>
|
---|
111 | </tr>
|
---|
112 | <tr>
|
---|
113 | <td valign="top">classdir</td>
|
---|
114 | <td valign="top">Indicates where compiled (unistrumented) classes are located.
|
---|
115 | This is required in order to properly update the icontrol.properties file, not
|
---|
116 | for instrumentation.</td>
|
---|
117 | <td valign="top" align="center">Only if <code>updateicontrol=true</code></td>
|
---|
118 | </tr>
|
---|
119 | <tr>
|
---|
120 | <td valign="top">targets</td>
|
---|
121 | <td valign="top">Name of the file that will be generated by this task, which lists all the
|
---|
122 | classes that iContract will instrument. If specified, the file will not be deleted after execution.
|
---|
123 | If not specified, a file will still be created, but it will be deleted after execution.</td>
|
---|
124 | <td valign="top" align="center">No</td>
|
---|
125 | </tr>
|
---|
126 | </table>
|
---|
127 |
|
---|
128 | <p>
|
---|
129 | <b>Note:</b> iContract will use the java compiler indicated by the project's
|
---|
130 | <code>build.compiler</code> property. See documentation of the Javac task for
|
---|
131 | more information. Nested includes and excludes are also supported.</p>
|
---|
132 |
|
---|
133 | <p><b>Example:</b></p>
|
---|
134 |
|
---|
135 | <p>
|
---|
136 | <b>Note:</b> iContract will use the java compiler indicated by the project's
|
---|
137 | <code>build.compiler</code> property. See documentation of the Javac task for
|
---|
138 | more information.</p>
|
---|
139 | <p>
|
---|
140 | Nested includes and excludes can be done very much the same way as any subclass
|
---|
141 | of MatchingTask.</p>
|
---|
142 |
|
---|
143 | <p><b>Example:</b></p>
|
---|
144 |
|
---|
145 | <pre>
|
---|
146 | <icontract
|
---|
147 | srcdir="${build.src}"
|
---|
148 | instrumentdir="${build.instrument}"
|
---|
149 | repositorydir="${build.repository}"
|
---|
150 | builddir="${build.instrclasses}"
|
---|
151 | updateicontrol="true"
|
---|
152 | classdir="${build.classes}"
|
---|
153 | controlfile="control"
|
---|
154 | targets="targets"
|
---|
155 | verbosity="error*,warning*"
|
---|
156 | quiet="true"
|
---|
157 | >
|
---|
158 | <classpath refid="compile-classpath"/>
|
---|
159 | </icontract>
|
---|
160 | </pre>
|
---|
161 |
|
---|
162 | <hr>
|
---|
163 | <p align="center">Copyright © 2001-2002,2004 The Apache Software Foundation. All rights
|
---|
164 | Reserved.</p>
|
---|
165 |
|
---|
166 | </body>
|
---|
167 | </html>
|
---|
168 |
|
---|