X-Git-Url: http://git.megacz.com/?p=org.ibex.classgen.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fclassgen%2FMethodRef.java;h=c866adca9f3074ad72978285784aa96f36b4556f;hp=cb546bdbf9396824851b85914751936205e2c7b5;hb=6c8fb599f516aa0003cb83c38d974a95385d77bf;hpb=eaa26b83ad7f83df63910284014f84657f0e798f diff --git a/src/org/ibex/classgen/MethodRef.java b/src/org/ibex/classgen/MethodRef.java index cb546bd..c866adc 100644 --- a/src/org/ibex/classgen/MethodRef.java +++ b/src/org/ibex/classgen/MethodRef.java @@ -1,16 +1,13 @@ package org.ibex.classgen; -public class MethodRef extends ClassGen.FieldMethodRef { - public MethodRef(Type.Object c, ClassGen.NameAndType t) { super(c,t); } - public MethodRef(Type.Object c, String name, String descriptor) { - this(c,new ClassGen.NameAndType(name,descriptor)); - } +public class MethodRef extends ClassGen.FieldOrMethodRef { public MethodRef(Type.Object c, String name, Type ret, Type[] args) { - this(c,name,getDescriptor(ret,args)); + super(c,name,getDescriptor(ret,args)); } public MethodRef(String s, String name, Type ret, Type[] args) { this(new Type.Object(s),name,ret,args); } + MethodRef(MethodRef i) { super(i); } static String getDescriptor(Type ret, Type[] args) { StringBuffer sb = new StringBuffer(args.length*4); @@ -20,5 +17,10 @@ public class MethodRef extends ClassGen.FieldMethodRef { sb.append(ret.getDescriptor()); return sb.toString(); } + + public static class I extends MethodRef { + public I(Type.Object 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); } + } } -