Task for Cobertura instrumentation based on the Ant task provided in the Cobertura distribution.
The task produces instrumented versions of the Java classes specified in the input property
inputClasses, and a file containing meta data about these instrumented classes, specified
by the property dataFile.
Note that all properties are read-only; they are configured in the task's context.
The properties of this task are to a large extent identical to the ones of the
Cobertura-Instrument Ant task, see the
reference> for more
information.
| Type | Name and description |
|---|---|
FileCollection |
getAuxClassPath()Get the path containing any classes that shouldn't be instrumented but are needed by the instrumentation. |
java.io.File |
getDataFile()Get the file to write instrumentation meta data to. |
java.util.List<java.lang.String> |
getIgnoreMethodAnnotations()Get the list of fully qualified names of annotations with which methods that should be excluded from instrumentation are annotated with. |
java.util.List<java.lang.String> |
getIgnoreMethodNames()Get the list of regular expressions specifying methods names to be excluded from the instrumentation. |
boolean |
getIgnoreTrivial()Get the flag specifying whether trivial methods should be ignored or not. |
FileCollection |
getInputClasses()Get the classes to instrument. |
java.io.File |
getInstrumentedClassesDir()Get the directory where to create the instrumented classes. |
void |
instrument()Perform instrumentation of the classes in the inputClasses file collection and write
the resulting classes to instrumentedClassesDir. |
| Methods inherited from class | Name |
|---|---|
class AbstractCoberturaTask |
getCoberturaClassPath, getContext, getExtension, init |
Get the path containing any classes that shouldn't be instrumented but are needed by the instrumentation.
Get the file to write instrumentation meta data to.
Get the list of fully qualified names of annotations with which methods that should be excluded from instrumentation are annotated with.
Get the list of regular expressions specifying methods names to be excluded from the instrumentation. Note that the classes containing the methods will still be instrumented.
Get the flag specifying whether trivial methods should be ignored or not. If this value is true, constructors/methods that contain one line of code will be excluded from the instrumentation. Examples include constructors only calling a super constructor, and getters/setters.
Get the classes to instrument.
Get the directory where to create the instrumented classes.
Perform instrumentation of the classes in the inputClasses file collection and write
the resulting classes to instrumentedClassesDir. Also create the instrumentation meta
data file dataFile.