Lines 311-317
Link Here
|
311 |
for(int i = 0; i< length ; i++){ |
311 |
for(int i = 0; i< length ; i++){ |
312 |
args[i] = new String(paramTypeNames[i]); |
312 |
args[i] = new String(paramTypeNames[i]); |
313 |
} |
313 |
} |
314 |
IMethod method = type.getMethod(new String(selector),args); |
314 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=316937 |
|
|
315 |
// BinaryType#getMethod() creates a new instance of BinaryMethod, which is a dummy. |
316 |
// Instead use IType#findMethods() to get a handle to the method. |
317 |
IMethod method = null; |
318 |
{ |
319 |
IType enclosingType = type.getDeclaringType(); |
320 |
if (enclosingType != null && CharOperation.equals(type.getElementName().toCharArray(), selector)) { |
321 |
String[] newArgs = new String[length + 1]; |
322 |
newArgs[0] = Signature.createTypeSignature(enclosingType.getFullyQualifiedName(), true); |
323 |
System.arraycopy(args, 0, newArgs, 1, length); |
324 |
method = type.getMethod(new String(selector), newArgs); |
325 |
} else { |
326 |
method = type.getMethod(new String(selector), args); |
327 |
} |
328 |
IMethod[] methods = type.findMethods(method); |
329 |
if (methods != null && methods.length > 0) { |
330 |
method = methods[0]; |
331 |
} |
332 |
} |
315 |
try{ |
333 |
try{ |
316 |
parameters = new char[length][]; |
334 |
parameters = new char[length][]; |
317 |
String[] params = method.getParameterNames(); |
335 |
String[] params = method.getParameterNames(); |