-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 MethodRef(Type.Object c, String name, Type ret, Type[] args) {
- this(c,name,getDescriptor(ret,args));
- }
- public MethodRef(String s, String name, Type ret, Type[] args) {
- this(new Type.Object(s),name,ret,args);
+/** This class represents Method references. It is used as an argument to the
+ INVOKESTATIC, INVOKEVIRTUAL, INVOKESPEICAL, and INVOKEINTERFACE bytecodes
+ @see CGConst#INVOKESTATIC
+ @see CGConst#INVOKEVIRTUAL
+ @see CGConst#INVOKESPECIAL
+ @see CGConst#INVOKEINTERFACE
+*/
+public class MethodRef extends MemberRef {
+
+ final Type[] argTypes;
+ final Type returnType;
+
+ /** 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.Class c, String name, Type returnType, Type[] argTypes) {
+ super(c, name);
+ this.argTypes = argTypes;
+ this.returnType = returnType;