display constants correctly in debug output
[org.ibex.classgen.git] / src / org / ibex / classgen / MethodGen.java
index e8e2a4f..50ff3af 100644 (file)
@@ -15,8 +15,8 @@ public class MethodGen extends Type.Class.Method.Body {
     private final Vector exnTable = new Vector();
     private final Hashtable thrownExceptions = new Hashtable();
     
-    private int maxStack = 16;
-    private int maxLocals;
+    int maxStack = 16;
+    int maxLocals;
     
     private int size;
     private int capacity;
@@ -133,7 +133,7 @@ public class MethodGen extends Type.Class.Method.Body {
                     break;
                 }
                 case MULTIANEWARRAY:
-                    arg = new MultiANewArray((Type.Class)cp.getKeyByIndex(in.readUnsignedShort()),in.readUnsignedByte());
+                    arg = new MultiANewArray((Type.Array)cp.getKeyByIndex(in.readUnsignedShort()),in.readUnsignedByte());
                     break;
                 case INVOKEINTERFACE: {
                     ConstantPool.Ent ent = cp.getByIndex(in.readUnsignedShort());
@@ -532,9 +532,9 @@ public class MethodGen extends Type.Class.Method.Body {
     }
     
     public static class MultiANewArray {
-        public Type.Class type;
+        public Type.Array type;
         public int dims;
-        public MultiANewArray(Type.Class type, int dims) { this.type = type; this.dims = dims; }
+        public MultiANewArray(Type.Array type, int dims) { this.type = type; this.dims = dims; }
     }
     
     public static class Wide {
@@ -998,7 +998,7 @@ public class MethodGen extends Type.Class.Method.Body {
             String s = null;
             if (arg[i] instanceof Type) s = ((Type)arg[i]).toString();
             else if (arg[i] instanceof Type.Class.Member) s = ((Type.Class.Member)arg[i]).toString();
-            else if (arg[i] instanceof String) s = "\"" + s + "\"";
+            else if (arg[i] instanceof String) s = "\"" + arg[i] + "\"";
             else if (arg[i] != null) s = arg[i].toString();
             if (s != null) sb.append(" ").append(s);
             sb.append("\n");