X-Git-Url: http://git.megacz.com/?p=org.ibex.classgen.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fclassgen%2FMethodRef.java;h=6dbb46feaf8463122979d052a97d77c827b6025c;hp=deec8197417d53eca82ad64a721c08dc671d7d08;hb=20b36057bc5aee6e799cce02a3bf289916889fc1;hpb=50a344886756b00af0e30d548a7a86822ef7e962
diff --git a/src/org/ibex/classgen/MethodRef.java b/src/org/ibex/classgen/MethodRef.java
index deec819..6dbb46f 100644
--- a/src/org/ibex/classgen/MethodRef.java
+++ b/src/org/ibex/classgen/MethodRef.java
@@ -7,36 +7,25 @@ package org.ibex.classgen;
@see CGConst#INVOKESPECIAL
@see CGConst#INVOKEINTERFACE
*/
-public class MethodRef extends ClassGen.FieldOrMethodRef {
+public class MethodRef extends MemberRef {
+
+ final Type[] argTypes;
+ final Type returnType;
+
/** Create a reference to method name of class c with the return type ret and the
arguments args */
- public MethodRef(Type.Object 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[])
- */
- public MethodRef(String s, String name, Type ret, Type[] args) {
- this(Type.fromDescriptor(s).asObject(), name, ret, args);
+ public MethodRef(Type.Class c, String name, Type returnType, Type[] argTypes) {
+ super(c, name);
+ this.argTypes = argTypes;
+ this.returnType = returnType;
}
- MethodRef(MethodRef i) { super(i); }
- static String getDescriptor(Type ret, Type[] args) {
- StringBuffer sb = new StringBuffer(args.length*4);
+ public String getDescriptor() {
+ StringBuffer sb = new StringBuffer(argTypes.length*4);
sb.append("(");
- for(int i=0;i