public class Instrumenter extends Object
Constructor and Description |
---|
Instrumenter(IExecutionDataAccessorGenerator runtime)
Creates a new instance based on the given runtime.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
instrument(byte[] buffer)
Creates a instrumented version of the given class if possible.
|
byte[] |
instrument(org.objectweb.asm.ClassReader reader)
Creates a instrumented version of the given class if possible.
|
byte[] |
instrument(InputStream input)
Creates a instrumented version of the given class if possible.
|
void |
instrument(InputStream input,
OutputStream output)
Creates a instrumented version of the given class file.
|
int |
instrumentAll(InputStream input,
OutputStream output)
Creates a instrumented version of the given resource depending on its
type.
|
int |
instrumentArchive(InputStream input,
OutputStream output)
Creates a instrumented version of the given archive, i.e.
|
public Instrumenter(IExecutionDataAccessorGenerator runtime)
runtime
- runtime used by the instrumented classespublic byte[] instrument(org.objectweb.asm.ClassReader reader)
reader
- definition of the class as ASM readerpublic byte[] instrument(byte[] buffer)
buffer
- definition of the classpublic byte[] instrument(InputStream input) throws IOException
input
- stream to read class definition fromIOException
- if reading data from the stream failspublic void instrument(InputStream input, OutputStream output) throws IOException
input
- stream to read class definition fromoutput
- stream to write the instrumented version of the class toIOException
- if reading data from the stream failspublic int instrumentArchive(InputStream input, OutputStream output) throws IOException
input
- stream to read archive fromoutput
- stream to write the instrumented version of the class toIOException
- if reading data from the stream failspublic int instrumentAll(InputStream input, OutputStream output) throws IOException
input
- stream to contents fromoutput
- stream to write the instrumented version of the contentsIOException
- if reading data from the stream failsCopyright © 2013. All Rights Reserved.