introduced Type.Ref as common superclass of Type.Class and Type.Array
[org.ibex.classgen.git] / src / org / ibex / classgen / MethodGen.java
index 4dd0547..632fc79 100644 (file)
@@ -32,7 +32,7 @@ public class MethodGen implements CGConst {
     public String toString() { StringBuffer sb = new StringBuffer(); toString(sb, "<init>"); return sb.toString(); }
     public void   toString(StringBuffer sb, String constructorName) {
         sb.append(ClassGen.flagsToString(flags));
-        sb.append(ret.humanReadable());
+        sb.append(ret);
         sb.append(" ");
 
         if (name.equals("<clinit>")) sb.append("static ");
@@ -41,7 +41,7 @@ public class MethodGen implements CGConst {
             else sb.append(name);
             sb.append("(");
             for(int i=0; i<args.length; i++)
-                sb.append((i==0?"":", ")+args[i].humanReadable());
+                sb.append((i==0?"":", ")+args[i]);
             sb.append(") ");
         }
         sb.append("{");
@@ -110,7 +110,7 @@ public class MethodGen implements CGConst {
         @param handler The instruction of the excepton handler
         @param type The type of exception that is to be handled (MUST inherit from Throwable)
     */
-    public final void addExceptionHandler(int start, int end, int handler, Type.Object type) {
+    public final void addExceptionHandler(int start, int end, int handler, Type.Class type) {
         exnTable.put(type, new ExnTableEnt(start, end, handler, cp.add(type)));
     }
     
@@ -118,7 +118,7 @@ public class MethodGen implements CGConst {
         NOTE: This isn't enforced by the JVM. This is for reference only. A method can throw exceptions not declared to be thrown 
         @param type The type of exception that can be thrown 
     */
-    public final void addThrow(Type.Object type) {
+    public final void addThrow(Type.Class type) {
         thrownExceptions.put(type, cp.add(type));
     }