public class CoverageTransformer extends Object implements ClassFileTransformer
Constructor and Description |
---|
CoverageTransformer(IRuntime runtime,
AgentOptions options,
IExceptionLogger logger)
New transformer with the given delegates.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
filter(ClassLoader loader,
String classname)
Checks whether this class should be instrumented.
|
byte[] |
transform(ClassLoader loader,
String classname,
Class<?> classBeingRedefined,
ProtectionDomain protectionDomain,
byte[] classfileBuffer) |
public CoverageTransformer(IRuntime runtime, AgentOptions options, IExceptionLogger logger)
runtime
- coverage runtimeoptions
- configuration options for the generatorlogger
- logger for exceptions during instrumentationpublic byte[] transform(ClassLoader loader, String classname, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException
transform
in interface ClassFileTransformer
IllegalClassFormatException
protected boolean filter(ClassLoader loader, String classname)
loader
- loader for the classclassname
- VM name of the class to checktrue
if the class should be instrumentedCopyright © 2014. All rights reserved.