1 package org.ibex.classgen;
3 public class MethodRef extends ClassGen.FieldOrMethodRef {
4 public MethodRef(Type.Object c, String name, Type ret, Type[] args) {
5 super(c,name,getDescriptor(ret,args));
7 public MethodRef(String s, String name, Type ret, Type[] args) {
8 this(new Type.Object(s),name,ret,args);
10 MethodRef(MethodRef i) { super(i); }
12 static String getDescriptor(Type ret, Type[] args) {
13 StringBuffer sb = new StringBuffer(args.length*4);
15 for(int i=0;i<args.length;i++) sb.append(args[i].getDescriptor());
17 sb.append(ret.getDescriptor());
21 public static class I extends MethodRef {
22 public I(Type.Object c, String name, Type ret, Type[] args) { super(c,name,ret,args); }
23 public I(String s, String name, Type ret, Type[] args) { super(s,name,ret,args); }
24 I(MethodRef m) { super(m); }