Thanks for the quick answer.
So what I would have to do is:
- Implement my own class that conforms to the interface
"java.lang.instrument.ClassFileTransformer"
- Register an object of that class with the PluggableInstrumentor
and then I'm ready to go?
So in code:
public class MyTransformer implements ClassFileTransformer
| {
| public byte[] transform(ClassLoader loader, String className, Class<?>
classBeingRedefined,
| ProtectionDomain protectionDomain, byte[] classfileBuffer)
| throws IllegalClassFormatException
| {
| //do something ...
| }
| }
| public class someOtherClass
| { //all static for simplicity
| public static MyTransformer transformer= new MyTransformer();
| static{
| PluggableInstrumentor.getInstrumentor().addTransformer(transformer)
| }
| }
Is that correct?
Kind regards
Frank
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185369#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...