X-Git-Url: http://git.megacz.com/?p=org.ibex.classgen.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fclassgen%2FClassGen.java;h=de32d3c251ff77fec35b67590ec37097f6a80446;hp=16e10e7e47b506fff5bc5a364392636fcd3a86d3;hb=0087af3d283954bbeeaaa857914ce9e06c39fcc7;hpb=bc9112573cba51be5e7d285ccd3e496be4278c63 diff --git a/src/org/ibex/classgen/ClassGen.java b/src/org/ibex/classgen/ClassGen.java index 16e10e7..de32d3c 100644 --- a/src/org/ibex/classgen/ClassGen.java +++ b/src/org/ibex/classgen/ClassGen.java @@ -7,6 +7,7 @@ public class ClassGen implements CGConst { private Type.Object thisType; private Type.Object superType; int flags; + private String sourceFile; private Vector interfaces = new Vector(); private Vector fields = new Vector(); @@ -42,6 +43,8 @@ public class ClassGen implements CGConst { return fg; } + public void setSourceFile(String sourceFile) { this.sourceFile = sourceFile; } + public void dump(String s) throws IOException { dump(new File(s)); } public void dump(File f) throws IOException { if(f.isDirectory()) { @@ -55,6 +58,7 @@ public class ClassGen implements CGConst { } dump(new FileOutputStream(f)); } + public void dump(OutputStream os) throws IOException { DataOutputStream dos = new DataOutputStream(new BufferedOutputStream(os)); _dump(dos); @@ -65,13 +69,17 @@ public class ClassGen implements CGConst { cp.add(thisType); cp.add(superType); for(int i=0;i