JBoss Community

Using Javassist without compilation

created by MK Song in Javassist Development - View the full discussion

I know it would be so funny question.

 

 

Can I use a Javassist API, such as methodB.insertBefore("System.out.println(...)");

 

without the entire compilation of class "A"?

 

 

For example, If I have class "A" that extends "HttpServlet", the current implementation should look up

 

"HttpServlet" class, in order to compile and instrument class "A".

 

Can I weave some method call in a method in class "A"

 

not compiling entire class "A" but generating only the bytecode for the transformed method?

Reply to this message by going to Community

Start a new discussion in Javassist Development at Community