7 Replies Latest reply on Oct 21, 2004 5:51 AM by Shigeru Chiba

    How to write new operator in function body ?

    Ariunbold Buyan-Ulzii Newbie

      Hi,all,
      i hava a problem about writing new operator in Javassist.
      Here as follows :
      When :
      CtMethod type= CtNewMethod
      .make(
      "public Type getNewType() { return new Type(); }",clas);
      clas.addMethod(type);
      Then i recieve:
      javassist.CannotCompileException: [source error] fatal
      at javassist.CtNewMethod.make(CtNewMethod.java:78)
      at javassist.CtNewMethod.make(CtNewMethod.java:44)

      I think problem is in writing new operator.