public class Instrumenter extends Object
| Constructor and Description |
|---|
Instrumenter(AgentConfigs agentConfigs) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
instrument(byte[] classfileBuffer) |
byte[] |
instrument(javassist.CtClass cc) |
int |
instrument(File source,
File dest) |
byte[] |
instrument(InputStream sourceStream) |
int |
instrumentRecursively(File source,
File dest) |
int |
instrumentToFile(InputStream input,
OutputStream output)
Creates a instrumented version of the given resource depending on its type.
|
void |
setRemoveSignatures(boolean flag)
Determines whether signatures should be removed from JAR files.
|
public Instrumenter(AgentConfigs agentConfigs)
agentConfigs - public void setRemoveSignatures(boolean flag)
true.flag - true if signatures should be removedpublic byte[] instrument(byte[] classfileBuffer)
throws Exception
classfileBuffer - Exceptionpublic byte[] instrument(InputStream sourceStream) throws Exception
sourceStream - Exceptionpublic byte[] instrument(javassist.CtClass cc)
throws Exception
cc - Exceptionpublic int instrumentToFile(InputStream input, OutputStream output) throws Exception
input - stream to contents fromoutput - stream to write the instrumented version of the contentsException - if reading data from the stream fails or a class cannot be instrumentedCopyright © 2010–2019 GZoltar. All rights reserved.