Member.getDescriptor
[org.ibex.classgen.git] / src / org / ibex / classgen / MethodGen.java
index 854b76a..c4ebfe9 100644 (file)
@@ -53,7 +53,7 @@ public class MethodGen extends Type.Class.Method.Body implements CGConst {
         m.super();
         this.flags = flags;
         if ((flags & ~VALID_METHOD_FLAGS) != 0) throw new ClassFile.ClassReadExn("invalid flags");
-        this.method = m;
+        this.method = c.method(name,typeDescriptor);
         this.attrs = new ClassFile.AttrGen(in,cp);
         
         if ((flags & (NATIVE|ABSTRACT))==0)  {
@@ -579,7 +579,7 @@ public class MethodGen extends Type.Class.Method.Body implements CGConst {
     */
     void finish(ConstantPool cp) {
         cp.addUtf8(method.name);
-        cp.addUtf8(method.getDescriptor());
+        cp.addUtf8(method.getTypeDescriptor());
         
         for(Enumeration e = thrownExceptions.keys();e.hasMoreElements();)
             cp.add(e.nextElement());
@@ -901,7 +901,7 @@ public class MethodGen extends Type.Class.Method.Body implements CGConst {
         
         o.writeShort(flags);
         o.writeShort(cp.getUtf8Index(method.name));
-        o.writeShort(cp.getUtf8Index(method.getDescriptor()));
+        o.writeShort(cp.getUtf8Index(method.getTypeDescriptor()));
         attrs.dump(o,cp);
     }