Provides the command line interface to modify byte code in a Java class or JAR files.
This is the first step in using JBlanket.
The following tags are required command line arguments for the main methods:
'classDir' - the directory containing all .class or .jar files to modify
For example: -classDir c:\cvs\jblanket\build\classes
'include' - file(s) to be modified located in classDir
For example: -include csdl\jblanket\example\foo\Foo.class
'exclude' - file(s) to remain untouched in classDir
For example: -exclude csdl\jblanket\example\foo\TestFoo2.class
'testGrammar' - grammar describing the names of the Test classes
For example: -testGrammar Test*.class
The following tags are optional command line arguments:
'verbose' - describes if instrumentation should execute in verbose mode
For example: -verbose true
'excludeOneLineMethods' - describes if one-line methods should be excluded
For example: -excludeOneLineMethods false
'excludeConstructors' - describes if constructors should be excluded
For example: -excludeConstructors false
'totalFile' - name of the XML file for all methods included in the coverage
measurement
For example: -totalFile totalMethods.xml
'untestableFile' - name of the XML file for all abstract or native methods
For example: -untestableFile untestableMethods.xml
'excludedFile' - name of the XML file for all methods specifically excluded
from the coverage measurement
For example: -excludedFile excludedMethods.xml
'oneLineFile' - name of the XML file for methods containing one line of source
code
For example: -oneLineFile oneLineMethods.xml
'constructorFile' - name of the XML file for constructors
For example: -constructorFile constructorMethods.xml
'packagePrefix' - name of a package prefix to include in the coverage
measurement
For example: -packagePrefix csdl.jblanket.
Classes are modified inside the 'classDir' directory. Specify multiple files with a
';'-delimited list. Similarly, exclude multiple files with a ';'-delimited list. 'Test*.class'
and '*Test.class' are the only valid grammars to describe the names of JUnit tests.
Default values provided for 'totalFile', 'untestableFile', 'excludedFile', 'oneLineFile', and
'constructorFile' are shown in the examples. However, the 'excludeOneLineMethods' or
'excludeConstructors' tags must be included to exclude methods with one line of source code or
constructors from the final coverage calculation. Without the tags, percent coverage is equal to
tested methods / (total methods - untestable methods - excluded methods)
With the 'excludeOneLineMethods' tag, percent coverage is equal to
tested methods / ((total methods - untestable methods - excluded methods) - one-line methods)
With the 'excludeConstructors' tag, percent coverage is equal to
tested methods / ((total methods - untestable methods - excluded methods) - constructors)
With both the 'excludeOneLineMethod' and 'excludeConstructors' tags, percent coverage is equal to
tested methods / (((total methods - untestable methods - excluded methods) - one-line methods)
- constructors)
author: Joy M. Agustin version: $Id: Modifier.java,v 1.2 2005/02/19 05:55:19 timshadel Exp $ |