1 Reply Latest reply on Jun 26, 2003 10:33 AM by chiba

    Modifying Wrapper

    bialek

      Dear Javassist Users,

      I need to change the way of creating the wrapper class in the Reflection.java.

      Instead of expanding the interface of the original class with setter/getter/wrapper methods, I need to have the MetaObject, which just calls the original object without chaning it.

      Let me illustrate it in an example:
      originalA {
      public int f() { return 1; }
      } is modified by the reflection type to something like:
      originalA {
      _original_f() { return 1;}
      public f () { return meta.trapMethod(_orifinal_f, args); }
      }
      what I need is sthg like
      metaA {
      private originalA wrapped; // the same class as the original A
      public int f () { return wrapped.f(); }
      }

      Is it possible? Do you know what part of the javassist package I can use/modify to achieve this?

      Thanks,
      ++Robert