X-Git-Url: http://git.megacz.com/?p=org.ibex.classgen.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fclassgen%2FMethodRef.java;fp=src%2Forg%2Fibex%2Fclassgen%2FMethodRef.java;h=399195ccb54aeef9eafb8becc09c38cd753b8b3c;hp=4810bbbb7ea19b2fdee510774cb2782dd021d73c;hb=d60e86de7947e6e628b5f90dfe19bee7f7a26bd0;hpb=6c44a3470c1ae5c0e54153871805e24e394a96bb
diff --git a/src/org/ibex/classgen/MethodRef.java b/src/org/ibex/classgen/MethodRef.java
index 4810bbb..399195c 100644
--- a/src/org/ibex/classgen/MethodRef.java
+++ b/src/org/ibex/classgen/MethodRef.java
@@ -8,25 +8,24 @@ package org.ibex.classgen;
@see CGConst#INVOKEINTERFACE
*/
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.Class c, String name, Type ret, Type[] args) {
- super(c, name, getDescriptor(ret, args));
- }
- /** 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.instance(s).asClass(), 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