public Method lookupMethod(CtClass clazz, CtClass currentClass, MethodInfo current, String methodName, int[] argTypes, int[] argDims, String[] argClassNames) throws CompileError { Method maybe = null; // to enable the creation of a recursively called method if (current != null && clazz == currentClass) if (current.getName().equals(methodName)) { int res = compareSignature(current.getDescriptor(), argTypes, argDims, argClassNames); if (res != NO) { Method r = new Method(clazz, current, res); if (res == YES) return r; else maybe = r; } } Method m = lookupMethod(clazz, methodName, argTypes, argDims, argClassNames, maybe != null); if (m != null) return m; else return maybe; }
/** * @return a pair of the class declaring the invoked method * and the MethodInfo of that method. Never null. */ public MemberResolver.Method atMethodCallCore(CtClass targetClass, String mname, ASTList args) throws CompileError { int nargs = getMethodArgsLength(args); int[] types = new int[nargs]; int[] dims = new int[nargs]; String[] cnames = new String[nargs]; atMethodArgs(args, types, dims, cnames); MemberResolver.Method found = resolver.lookupMethod(targetClass, thisClass, thisMethod, mname, types, dims, cnames); if (found == null) { String clazz = targetClass.getName(); String signature = argTypesToString(types, dims, cnames); String msg; if (mname.equals(MethodInfo.nameInit)) msg = "cannot find constructor " + clazz + signature; else msg = mname + signature + " not found in " + clazz; throw new CompileError(msg); } String desc = found.info.getDescriptor(); setReturnType(desc); return found; }
public Method lookupMethod(CtClass clazz, CtClass currentClass, MethodInfo current, String methodName, int[] argTypes, int[] argDims, String[] argClassNames) throws CompileError { Method maybe = null; // to enable the creation of a recursively called method if (current != null && clazz == currentClass) if (current.getName().equals(methodName)) { int res = compareSignature(current.getDescriptor(), argTypes, argDims, argClassNames); if (res != NO) { Method r = new Method(clazz, current, res); if (res == YES) return r; maybe = r; } } Method m = lookupMethod(clazz, methodName, argTypes, argDims, argClassNames, maybe != null); if (m != null) return m; return maybe; }
found = resolver.lookupMethod(targetClass, thisClass, thisMethod, mname, types, dims, cnames);
CtClass pclazz = clazz.getSuperclass(); if (pclazz != null) { Method r = lookupMethod(pclazz, methodName, argTypes, argDims, argClassNames, onlyExact); if (r != null) int size = ifs.length; for (int i = 0; i < size; ++i) { Method r = lookupMethod(ifs[i], methodName, argTypes, argDims, argClassNames, onlyExact); Method r = lookupMethod(pclazz, methodName, argTypes, argDims, argClassNames, onlyExact); if (r != null)
/** * @return a pair of the class declaring the invoked method * and the MethodInfo of that method. Never null. */ public MemberResolver.Method atMethodCallCore(CtClass targetClass, String mname, ASTList args) throws CompileError { int nargs = getMethodArgsLength(args); int[] types = new int[nargs]; int[] dims = new int[nargs]; String[] cnames = new String[nargs]; atMethodArgs(args, types, dims, cnames); MemberResolver.Method found = resolver.lookupMethod(targetClass, thisClass, thisMethod, mname, types, dims, cnames); if (found == null) { String clazz = targetClass.getName(); String signature = argTypesToString(types, dims, cnames); String msg; if (mname.equals(MethodInfo.nameInit)) msg = "cannot find constructor " + clazz + signature; else msg = mname + signature + " not found in " + clazz; throw new CompileError(msg); } String desc = found.info.getDescriptor(); setReturnType(desc); return found; }
found = resolver.lookupMethod(targetClass, thisClass, thisMethod, mname, types, dims, cnames);
CtClass pclazz = clazz.getSuperclass(); if (pclazz != null) { Method r = lookupMethod(pclazz, methodName, argTypes, argDims, argClassNames, onlyExact); if (r != null) CtClass[] ifs = clazz.getInterfaces(); for (CtClass intf:ifs) { Method r = lookupMethod(intf, methodName, argTypes, argDims, argClassNames, onlyExact); Method r = lookupMethod(pclazz, methodName, argTypes, argDims, argClassNames, onlyExact); if (r != null)
public Method lookupMethod(CtClass clazz, CtClass currentClass, MethodInfo current, String methodName, int[] argTypes, int[] argDims, String[] argClassNames) throws CompileError { Method maybe = null; // to enable the creation of a recursively called method if (current != null && clazz == currentClass) if (current.getName().equals(methodName)) { int res = compareSignature(current.getDescriptor(), argTypes, argDims, argClassNames); if (res != NO) { Method r = new Method(clazz, current, res); if (res == YES) return r; else maybe = r; } } Method m = lookupMethod(clazz, methodName, argTypes, argDims, argClassNames, maybe != null); if (m != null) return m; else return maybe; }
public Method lookupMethod(CtClass clazz, CtClass currentClass, MethodInfo current, String methodName, int[] argTypes, int[] argDims, String[] argClassNames) throws CompileError { Method maybe = null; // to enable the creation of a recursively called method if (current != null && clazz == currentClass) if (current.getName().equals(methodName)) { int res = compareSignature(current.getDescriptor(), argTypes, argDims, argClassNames); if (res != NO) { Method r = new Method(clazz, current, res); if (res == YES) return r; else maybe = r; } } Method m = lookupMethod(clazz, methodName, argTypes, argDims, argClassNames, maybe != null); if (m != null) return m; else return maybe; }
public Method lookupMethod(CtClass clazz, CtClass currentClass, MethodInfo current, String methodName, int[] argTypes, int[] argDims, String[] argClassNames) throws CompileError { Method maybe = null; // to enable the creation of a recursively called method if (current != null && clazz == currentClass) if (current.getName().equals(methodName)) { int res = compareSignature(current.getDescriptor(), argTypes, argDims, argClassNames); if (res != NO) { Method r = new Method(clazz, current, res); if (res == YES) return r; else maybe = r; } } Method m = lookupMethod(clazz, methodName, argTypes, argDims, argClassNames, maybe != null); if (m != null) return m; else return maybe; }
public Method lookupMethod(CtClass clazz, CtClass currentClass, MethodInfo current, String methodName, int[] argTypes, int[] argDims, String[] argClassNames) throws CompileError { Method maybe = null; // to enable the creation of a recursively called method if (current != null && clazz == currentClass) if (current.getName().equals(methodName)) { int res = compareSignature(current.getDescriptor(), argTypes, argDims, argClassNames); if (res != NO) { Method r = new Method(clazz, current, res); if (res == YES) return r; else maybe = r; } } Method m = lookupMethod(clazz, methodName, argTypes, argDims, argClassNames, maybe != null); if (m != null) return m; else return maybe; }
public Method lookupMethod(CtClass clazz, CtClass currentClass, MethodInfo current, String methodName, int[] argTypes, int[] argDims, String[] argClassNames) throws CompileError { Method maybe = null; // to enable the creation of a recursively called method if (current != null && clazz == currentClass) if (current.getName().equals(methodName)) { int res = compareSignature(current.getDescriptor(), argTypes, argDims, argClassNames); if (res != NO) { Method r = new Method(clazz, current, res); if (res == YES) return r; else maybe = r; } } Method m = lookupMethod(clazz, methodName, argTypes, argDims, argClassNames, maybe != null); if (m != null) return m; else return maybe; }
/** * @return a pair of the class declaring the invoked method * and the MethodInfo of that method. Never null. */ public MemberResolver.Method atMethodCallCore(CtClass targetClass, String mname, ASTList args) throws CompileError { int nargs = getMethodArgsLength(args); int[] types = new int[nargs]; int[] dims = new int[nargs]; String[] cnames = new String[nargs]; atMethodArgs(args, types, dims, cnames); MemberResolver.Method found = resolver.lookupMethod(targetClass, thisClass, thisMethod, mname, types, dims, cnames); if (found == null) { String clazz = targetClass.getName(); String signature = argTypesToString(types, dims, cnames); String msg; if (mname.equals(MethodInfo.nameInit)) msg = "cannot find constructor " + clazz + signature; else msg = mname + signature + " not found in " + clazz; throw new CompileError(msg); } String desc = found.info.getDescriptor(); setReturnType(desc); return found; }
/** * @return a pair of the class declaring the invoked method * and the MethodInfo of that method. Never null. */ public MemberResolver.Method atMethodCallCore(CtClass targetClass, String mname, ASTList args) throws CompileError { int nargs = getMethodArgsLength(args); int[] types = new int[nargs]; int[] dims = new int[nargs]; String[] cnames = new String[nargs]; atMethodArgs(args, types, dims, cnames); MemberResolver.Method found = resolver.lookupMethod(targetClass, thisClass, thisMethod, mname, types, dims, cnames); if (found == null) { String clazz = targetClass.getName(); String signature = argTypesToString(types, dims, cnames); String msg; if (mname.equals(MethodInfo.nameInit)) msg = "cannot find constructor " + clazz + signature; else msg = mname + signature + " not found in " + clazz; throw new CompileError(msg); } String desc = found.info.getDescriptor(); setReturnType(desc); return found; }
/** * @return a pair of the class declaring the invoked method * and the MethodInfo of that method. Never null. */ public MemberResolver.Method atMethodCallCore(CtClass targetClass, String mname, ASTList args) throws CompileError { int nargs = getMethodArgsLength(args); int[] types = new int[nargs]; int[] dims = new int[nargs]; String[] cnames = new String[nargs]; atMethodArgs(args, types, dims, cnames); MemberResolver.Method found = resolver.lookupMethod(targetClass, thisClass, thisMethod, mname, types, dims, cnames); if (found == null) { String clazz = targetClass.getName(); String signature = argTypesToString(types, dims, cnames); String msg; if (mname.equals(MethodInfo.nameInit)) msg = "cannot find constructor " + clazz + signature; else msg = mname + signature + " not found in " + clazz; throw new CompileError(msg); } String desc = found.info.getDescriptor(); setReturnType(desc); return found; }
/** * @return a pair of the class declaring the invoked method * and the MethodInfo of that method. Never null. */ public MemberResolver.Method atMethodCallCore(CtClass targetClass, String mname, ASTList args) throws CompileError { int nargs = getMethodArgsLength(args); int[] types = new int[nargs]; int[] dims = new int[nargs]; String[] cnames = new String[nargs]; atMethodArgs(args, types, dims, cnames); MemberResolver.Method found = resolver.lookupMethod(targetClass, thisClass, thisMethod, mname, types, dims, cnames); if (found == null) { String clazz = targetClass.getName(); String signature = argTypesToString(types, dims, cnames); String msg; if (mname.equals(MethodInfo.nameInit)) msg = "cannot find constructor " + clazz + signature; else msg = mname + signature + " not found in " + clazz; throw new CompileError(msg); } String desc = found.info.getDescriptor(); setReturnType(desc); return found; }
/** * @return a pair of the class declaring the invoked method * and the MethodInfo of that method. Never null. */ public MemberResolver.Method atMethodCallCore(CtClass targetClass, String mname, ASTList args) throws CompileError { int nargs = getMethodArgsLength(args); int[] types = new int[nargs]; int[] dims = new int[nargs]; String[] cnames = new String[nargs]; atMethodArgs(args, types, dims, cnames); MemberResolver.Method found = resolver.lookupMethod(targetClass, thisClass, thisMethod, mname, types, dims, cnames); if (found == null) { String clazz = targetClass.getName(); String signature = argTypesToString(types, dims, cnames); String msg; if (mname.equals(MethodInfo.nameInit)) msg = "cannot find constructor " + clazz + signature; else msg = mname + signature + " not found in " + clazz; throw new CompileError(msg); } String desc = found.info.getDescriptor(); setReturnType(desc); return found; }
found = resolver.lookupMethod(targetClass, thisClass, thisMethod, mname, types, dims, cnames);
found = resolver.lookupMethod(targetClass, thisClass, thisMethod, mname, types, dims, cnames);