com.jcoverage.coverage
Class Instrument
java.lang.Object
com.jcoverage.coverage.Instrument
- public class Instrument
- extends java.lang.Object
Add coverage instrumentation to existing classes.
Method Summary |
(package private) void |
addInstrumentation(java.io.File fi)
|
(package private) void |
addInstrumentation(java.lang.String arg)
|
(package private) void |
addInstrumentation(java.lang.String[] args)
|
(package private) void |
instrument(java.io.File clazz)
Add coverage instrumentation to the specified Java class. |
(package private) boolean |
isAlreadyInstrumented(org.apache.bcel.classfile.JavaClass jc)
|
(package private) boolean |
isClass(java.io.File fi)
|
(package private) boolean |
isInterface(org.apache.bcel.classfile.JavaClass jc)
|
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
static final org.apache.log4j.Logger logger
destinationDirectory
java.io.File destinationDirectory
ignoreRegex
java.lang.String ignoreRegex
baseDir
java.io.File baseDir
Instrument
public Instrument()
isClass
boolean isClass(java.io.File fi)
- Parameters:
fi
- a file
- Returns:
- true if the specified file has "class" as its extension,
false otherwise.
isAlreadyInstrumented
boolean isAlreadyInstrumented(org.apache.bcel.classfile.JavaClass jc)
- Parameters:
jc
- a compiled Java class
- Returns:
- true if the specified class implements the interface
isInterface
boolean isInterface(org.apache.bcel.classfile.JavaClass jc)
- Parameters:
jc
- a compiled Java class
- Returns:
- true if the class represented by
jc
is an
interface.
instrument
void instrument(java.io.File clazz)
- Add coverage instrumentation to the specified Java class.
- Parameters:
clazz
- a Java class file.
addInstrumentation
void addInstrumentation(java.io.File fi)
addInstrumentation
void addInstrumentation(java.lang.String arg)
addInstrumentation
void addInstrumentation(java.lang.String[] args)
main
public static void main(java.lang.String[] args)