X-Git-Url: http://git.megacz.com/?p=org.ibex.classgen.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fclassgen%2FClassFile.java;h=f59851925c04d385b682d1cc3b242dd35380d80b;hp=f70ed48b37c02e7183394a3449175b5bf57547e1;hb=9603ae5a156fae4acb8423dba6d5e4d571fd2d6e;hpb=e2310783b3b5cf06044d90387938209726054980 diff --git a/src/org/ibex/classgen/ClassFile.java b/src/org/ibex/classgen/ClassFile.java index f70ed48..f598519 100644 --- a/src/org/ibex/classgen/ClassFile.java +++ b/src/org/ibex/classgen/ClassFile.java @@ -13,7 +13,7 @@ public class ClassFile implements CGConst { 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; @@ -86,7 +86,7 @@ public class ClassFile implements CGConst { @see CGConst */ public final MethodGen addMethod(String name, Type ret, Type[] args, int flags) { - MethodGen mg = new MethodGen(this.getType(), name, ret, args, flags, (this.flags & INTERFACE) != 0); + MethodGen mg = new MethodGen(getType().method(name, ret, args), flags); methods.addElement(mg); return mg; } @@ -199,7 +199,8 @@ public class ClassFile implements CGConst { } } - ClassFile(DataInput i) throws IOException { + public ClassFile(DataInput i) throws IOException { this(i, false); } + public ClassFile(DataInput i, boolean ssa) throws IOException { int magic = i.readInt(); if (magic != 0xcafebabe) throw new ClassReadExn("invalid magic: " + Long.toString(0xffffffffL & magic, 16)); minor = i.readShort(); @@ -215,7 +216,9 @@ public class ClassFile implements CGConst { int numFields = i.readShort(); for(int j=0; j