major updates to JSSA
authoradam <adam@megacz.com>
Fri, 1 Jul 2005 05:58:08 +0000 (05:58 +0000)
committeradam <adam@megacz.com>
Fri, 1 Jul 2005 05:58:08 +0000 (05:58 +0000)
darcs-hash:20050701055808-5007d-096d5239e36d6be70de157283257bc693b029e06.gz

src/org/ibex/classgen/ClassFile.java
src/org/ibex/classgen/MethodGen.java
src/org/ibex/classgen/Type.java

index 2cd4d5f..a5c22f2 100644 (file)
@@ -13,7 +13,7 @@ public class ClassFile implements CGConst {
     final int flags;
     
     private final Vector fields = new Vector();
     final int flags;
     
     private final Vector fields = new Vector();
-    private final Vector methods = new Vector();
+    public final Vector methods = new Vector();
     
     private final AttrGen attributes;
 
     
     private final AttrGen attributes;
 
index 3405fc9..7c740d1 100644 (file)
@@ -10,7 +10,7 @@ public class MethodGen implements CGConst {
     
     private static final int NO_CODE = -1;
 
     
     private static final int NO_CODE = -1;
 
-    private final Type.Class.Method method;
+    public final Type.Class.Method method;
     private final int flags;
     private final ClassFile.AttrGen attrs;
     private final ClassFile.AttrGen codeAttrs;
     private final int flags;
     private final ClassFile.AttrGen attrs;
     private final ClassFile.AttrGen codeAttrs;
index 7445f9c..795a73e 100644 (file)
@@ -141,6 +141,8 @@ public class Type {
                     o.getDescriptor().equals(getDescriptor());
             }
             public int hashCode() { return getDeclaringClass().hashCode() ^ name.hashCode() ^ getDescriptor().hashCode(); }
                     o.getDescriptor().equals(getDescriptor());
             }
             public int hashCode() { return getDeclaringClass().hashCode() ^ name.hashCode() ^ getDescriptor().hashCode(); }
+            public String toString() { return debugToString(); }
+            public abstract String debugToString();
         }
     
         public class Field extends Member {
         }
     
         public class Field extends Member {
@@ -148,6 +150,7 @@ public class Type {
             private Field(String name, Type t) { super(name); this.type = t; }
             public String getDescriptor() { return name; }
             public Type getType() { return type; }
             private Field(String name, Type t) { super(name); this.type = t; }
             public String getDescriptor() { return name; }
             public Type getType() { return type; }
+            public String debugToString() { return getDeclaringClass()+"."+name+"["+type+"]"; }
         }
 
         public class Method extends Member {
         }
 
         public class Method extends Member {