2 Replies Latest reply on Sep 20, 2004 9:46 PM by Shigeru Chiba

    Abount local variables

    xu dong Newbie

      hi all,

      I am doing something on method level based on javassist.

      For example:

      the orginial method like this
      void foo(void) {
      do something ...
      }

      after instrmenting this method like this:
      void foo(void) {
      // insertBefore
      int myInt = 12;
      {
      ...
      }

      do something ...

      // insertAfter
      System.our.println(Integer.toString(myInt)); //??? here, javassist compalins that : [source error] no such field: myInt
      }

      what's wrong here?

      thanks.

      best wishes,
      xudong