introduced Type.Ref as common superclass of Type.Class and Type.Array
[org.ibex.classgen.git] / src / org / ibex / classgen / MethodRef.java
index deec819..6460280 100644 (file)
@@ -10,14 +10,14 @@ package org.ibex.classgen;
 public class MethodRef extends ClassGen.FieldOrMethodRef {
     /** Create a reference to method <i>name</i> of class <i>c</i> with the return type <i>ret</i> and the
         arguments <i>args</i> */
-    public MethodRef(Type.Object c, String name, Type ret, Type[] args) {
+    public MethodRef(Type.Class c, String name, Type ret, Type[] args) {
         super(c, name, getDescriptor(ret, args));
     }
-    /** Equivalent to MethodRef(new Type.Object(s), ...)
-        @see #MethodRef(Type.Object, String, Type, Type[])
+    /** Equivalent to MethodRef(new Type.Class(s), ...)
+        @see #MethodRef(Type.Class, String, Type, Type[])
     */
     public MethodRef(String s, String name, Type ret, Type[] args) {
-        this(Type.fromDescriptor(s).asObject(), name, ret, args);
+        this(Type.fromDescriptor(s).asClass(), name, ret, args);
     }
     MethodRef(MethodRef i) { super(i); }
     
@@ -35,7 +35,7 @@ public class MethodRef extends ClassGen.FieldOrMethodRef {
         users don't need to be concerned with this though because MethodRef's are automatically converted
         to MethodRef.I's when they are applied to an INVOKEINTERFACE bytecode */
     public static class I extends MethodRef {
-        public I(Type.Object c, String name, Type ret, Type[] args) { super(c, name, ret, args); }
+        public I(Type.Class c, String name, Type ret, Type[] args) { super(c, name, ret, args); }
         public I(String s, String name, Type ret, Type[] args) { super(s, name, ret, args); }
         I(MethodRef m) { super(m); }
     }