0 Replies Latest reply on Feb 29, 2012 11:33 AM by mksong

    Using Javassist without compilation

    mksong

      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?