0 Replies Latest reply on Oct 21, 2010 6:03 AM by Alexey Zhukov

    Acessing instance initializer via Javassist

    Alexey Zhukov Newbie

      Can i access instance initializer of class using Javassist to modificate it, copy to method or delete?

       

      class MyClass {     
           static {
                // i can access this one using CtClass.getClassInitializer()
           }
      
           public static void main(String[] args) {
               new MyClass() {
                   { // need to access this one
                   }
               }
           }
      }