X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fclassgen%2FMethodRef.java;h=4810bbbb7ea19b2fdee510774cb2782dd021d73c;hb=6c44a3470c1ae5c0e54153871805e24e394a96bb;hp=75d58f3523f143bba58e39c8d7a91c8991f5d733;hpb=94cebd4c12247ae7fd0a4b0cc66609fead0efece;p=org.ibex.classgen.git diff --git a/src/org/ibex/classgen/MethodRef.java b/src/org/ibex/classgen/MethodRef.java index 75d58f3..4810bbb 100644 --- a/src/org/ibex/classgen/MethodRef.java +++ b/src/org/ibex/classgen/MethodRef.java @@ -7,17 +7,17 @@ package org.ibex.classgen; @see CGConst#INVOKESPECIAL @see CGConst#INVOKEINTERFACE */ -public class MethodRef extends ClassGen.FieldOrMethodRef { +public class MethodRef extends MemberRef { /** 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)); + 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(new Type.Object(s),name,ret,args); + this(Type.instance(s).asClass(), name, ret, args); } MethodRef(MethodRef i) { super(i); } @@ -35,8 +35,8 @@ 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(String s, String name, Type ret, Type[] args) { super(s,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); } } }