Class Assertions

java.lang.Object
All Implemented Interfaces:
Cloneable

public class Assertions extends DataType implements Cloneable
The assertion datatype. This type describes assertion settings for the <java> task and others. One can set the system assertions, and enable/disable those in packages and classes. Assertions can only be enabled or disabled when forking Java. Example: set system assertions and all org.apache packages except for ant, and the class org.apache.tools.ant.Main.
 <assertions enableSystemAssertions="true" >
   <enable package="org.apache" />
   <disable package="org.apache.ant" />
   <enable class="org.apache.tools.ant.Main"/>
 </assertions>
Disable system assertions; enable those in the anonymous package
 <assertions enableSystemAssertions="false" >
   <enable package="..." />
 </assertions>
 
enable assertions in a class called Test
 <assertions >
   <enable class="Test" />
 </assertions>
 
This type is a datatype, so you can declare assertions and use them later
 <assertions id="project.assertions" >
   <enable project="org.apache.test" />
 </assertions>

 <assertions refid="project.assertions" />

 
Since:
Ant 1.6