java left logo
java middle logo
java right logo
 

Home arrow Other API Tips
 
 
Main Menu
Home
Java Tutorials
Book Reviews
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Java Network
Java Forums
Java Blog




Most Visited Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews
Top Rated Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews


Statistics
Registered Users: 4095
Java SE Tips: 614
Java ME Tips: 202
Java EE Tips: 183
Other API Tips: 779
Java Applications: 298
Java Libraries: 209
Java Games: 16
Book Reviews:
 
 
 
How to use IContract task E-mail
User Rating: / 1
PoorBest 

icontract

Description

Instruments Java classes with iContract DBC preprocessor.
The task can generate a properties file for iControl, 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.

Parameters

Attribute Description Required
srcdir Location of the java files. Yes
instrumentdir Indicates where the instrumented source files should go. Yes
repositorydir Indicates where the repository source files should go. Yes
builddir Indicates where the compiled instrumented classes should go. Defaults to the value of instrumentdir. NOTE: 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). No
repbuilddir Indicates where the compiled repository classes should go. Defaults to the value of repositorydir. No
pre Indicates whether or not to instrument for preconditions. Defaults to true unless controlfile is specified, in which case it defaults to false. No
post Indicates whether or not to instrument for postconditions. Defaults to true unless controlfile is specified, in which case it defaults to false. No
invariant Indicates whether or not to instrument for invariants. Defaults to true unless controlfile is specified, in which case it defaults to false. No
failthrowable The full name of the Throwable (Exception) that should be thrown when an assertion is violated. Defaults to java.lang.Error No
verbosity Indicates the verbosity level of iContract. Any combination of error*,warning*,note*,info*,progress*,debug* (comma separated) can be used. Defaults to error* No
quiet 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 false No
updateicontrol 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 false. No
controlfile The name of the control file to pass to iContract. Consider using iControl to generate the file. Default is not to pass a file. Only if updateicontrol=true
classdir Indicates where compiled (uninstrumented) classes are located. This is required in order to properly update the icontrol.properties file, not for instrumentation. Only if updateicontrol=true
targets 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. No

Note: iContract will use the java compiler indicated by the project's build.compiler property. See documentation of the Javac task for more information. Nested includes and excludes are also supported.

Example:

Note: iContract will use the java compiler indicated by the project's build.compiler property. See documentation of the Javac task for more information.

Nested includes and excludes can be done very much the same way as any subclass of MatchingTask.

Example:

 <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>

Source: Apache Ant


 Related Tips

 
< Prev   Next >

Page 1 of 0 ( 0 comments )

You can share your information about this topic using the form below!

Please do not post your questions with this form! Thanks.


Name (required)


E-Mail (required)

Your email will not be displayed on the site - only to our administrator
Homepage(optional)



Comment Enable HTML code : Yes No



 
       
         
     
 
 
 
   
 
 
java bottom left
java bottom middle
java bottom right
RSS 0.91 FeedRSS 1.0 FeedRSS 2.0 FeedATOM FeedOPML Feed

Home - About Us - Privacy Policy
Copyright 2005 - 2008 www.java-tips.org
Java is a trademark of Sun Microsystems, Inc.