<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" />
Modifier and Type | Class and Description |
---|---|
public abstract static class | Assertions.BaseAssertion
base class for our assertion elements. |
public static class | Assertions.DisabledAssertion
A disabled assertion disables things |
public static class | Assertions.EnabledAssertion
an enabled assertion enables things |
Modifier and Type | Field and Description |
---|---|
private ArrayList | assertionList
list of type BaseAssertion |
private Boolean | enableSystemAssertions
enable/disable sys assertions; null means undefined |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public void | addDisable(Assertions.
a disable assertion nested element assertiondisable assertions |
public void | |
private static void | addVmArgument(CommandlineJava
ditto command, String ditto arg)helper method to add a string JVM argument to a command |
public void | applyAssertions(List<String>
the command line to format commandList)add the assertions to a list in a format suitable for adding to a command line |
public void | applyAssertions(CommandlineJava
the command line to format command)apply all the assertions to the command. |
public void | applyAssertions(final ListIterator<String>
list of commands commandIterator)add the assertions to a list in a format suitable for adding to a command line |
public Object | |
private Assertions | Returns: the object that contains the assertion infoget whatever we are referencing to. |
private int | |
public void | setEnableSystemAssertions(Boolean
if true enable system assertions enableSystemAssertions)enable or disable system assertions. |
public void | setRefid(Reference
the reference to use ref)Overrides org. |
public int | Returns: total # of commands to makehow many assertions are made...will resolve references before returning |
assertionList | back to summary |
---|---|
private ArrayList<Assertions. list of type BaseAssertion |
enableSystemAssertions | back to summary |
---|---|
private Boolean enableSystemAssertions enable/disable sys assertions; null means undefined |
Assertions | back to summary |
---|---|
public Assertions() |
addDisable | back to summary |
---|---|
public void addDisable(Assertions. disable assertions
|
addEnable | back to summary |
---|---|
public void addEnable(Assertions. enable assertions
|
addVmArgument | back to summary |
---|---|
private static void addVmArgument(CommandlineJava command, String arg) helper method to add a string JVM argument to a command
|
applyAssertions | back to summary |
---|---|
public void applyAssertions(List<String> commandList) add the assertions to a list in a format suitable for adding to a command line |
applyAssertions | back to summary |
---|---|
public void applyAssertions(CommandlineJava command) apply all the assertions to the command.
|
applyAssertions | back to summary |
---|---|
public void applyAssertions(final ListIterator<String> commandIterator) add the assertions to a list in a format suitable for adding to a command line
|
clone | back to summary |
---|---|
public Object clone() throws CloneNotSupportedException Overrides org. clone the objects. This is not a full depth clone; the list of assertions is cloned, but it does not clone the underlying assertions.
|
getFinalReference | back to summary |
---|---|
private Assertions getFinalReference() get whatever we are referencing to. This could be ourself.
|
getFinalSize | back to summary |
---|---|
private int getFinalSize() what is the final size of this object
|
setEnableSystemAssertions | back to summary |
---|---|
public void setEnableSystemAssertions(Boolean enableSystemAssertions) enable or disable system assertions. Default is not set (neither -enablesystemassertions or -disablesytemassertions are used on the command line).
|
setRefid | back to summary |
---|---|
public void setRefid(Reference ref) Overrides org. Set the value of the refid attribute. Subclasses may need to check whether any other attributes
have been set as well or child elements have been created and
thus override this method. if they do the must call
|
size | back to summary |
---|---|
public int size() how many assertions are made...will resolve references before returning
|
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
protected String | |
public abstract String | |
protected String | |
public void | |
public void | |
public String |
className | back to summary |
---|---|
private String className |
packageName | back to summary |
---|---|
private String packageName |
BaseAssertion | back to summary |
---|---|
public BaseAssertion() |
getClassName | back to summary |
---|---|
protected String getClassName() what is the class name? |
getCommandPrefix | back to summary |
---|---|
public abstract String getCommandPrefix() get the prefix used to begin the command; -ea or -da.
|
getPackageName | back to summary |
---|---|
protected String getPackageName() what is the package name?
|
setClass | back to summary |
---|---|
public void setClass(String className) name a class
|
setPackage | back to summary |
---|---|
public void setPackage(String packageName) name a package
|
toCommand | back to summary |
---|---|
public String toCommand() create a full command string from this class
|
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public String | Returns: prefixImplements abstract org. |
DisabledAssertion | back to summary |
---|---|
public DisabledAssertion() |
getCommandPrefix | back to summary |
---|---|
public String getCommandPrefix() Implements abstract org. get the prefix used to begin the command; -ea or -da. |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public String | Returns: prefixImplements abstract org. |
EnabledAssertion | back to summary |
---|---|
public EnabledAssertion() |
getCommandPrefix | back to summary |
---|---|
public String getCommandPrefix() Implements abstract org. get the prefix used to begin the command; -ea or -da. |