Lines 52-58
Link Here
|
52 |
} |
52 |
} |
53 |
public boolean equals(Object o) { |
53 |
public boolean equals(Object o) { |
54 |
if (!(o instanceof BinaryMethod)) return false; |
54 |
if (!(o instanceof BinaryMethod)) return false; |
55 |
return super.equals(o) && Util.equalArraysOrNull(this.parameterTypes, ((BinaryMethod)o).parameterTypes); |
55 |
return super.equals(o) && Util.equalArraysOrNull(getErasedParameterTypes(), ((BinaryMethod)o).getErasedParameterTypes()); |
56 |
} |
56 |
} |
57 |
public IAnnotation[] getAnnotations() throws JavaModelException { |
57 |
public IAnnotation[] getAnnotations() throws JavaModelException { |
58 |
IBinaryMethod info = (IBinaryMethod) getElementInfo(); |
58 |
IBinaryMethod info = (IBinaryMethod) getElementInfo(); |
Lines 372-377
Link Here
|
372 |
return this.parameterTypes; |
372 |
return this.parameterTypes; |
373 |
} |
373 |
} |
374 |
|
374 |
|
|
|
375 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=299384 |
376 |
private String [] getErasedParameterTypes() { |
377 |
int paramCount = this.parameterTypes.length; |
378 |
String [] erasedTypes = new String [paramCount]; |
379 |
for (int i = 0; i < paramCount; i++) { |
380 |
erasedTypes[i] = Signature.getTypeErasure(this.parameterTypes[i]); |
381 |
} |
382 |
return erasedTypes; |
383 |
} |
384 |
|
375 |
public ITypeParameter getTypeParameter(String typeParameterName) { |
385 |
public ITypeParameter getTypeParameter(String typeParameterName) { |
376 |
return new TypeParameter(this, typeParameterName); |
386 |
return new TypeParameter(this, typeParameterName); |
377 |
} |
387 |
} |
Lines 446-452
Link Here
|
446 |
public int hashCode() { |
456 |
public int hashCode() { |
447 |
int hash = super.hashCode(); |
457 |
int hash = super.hashCode(); |
448 |
for (int i = 0, length = this.parameterTypes.length; i < length; i++) { |
458 |
for (int i = 0, length = this.parameterTypes.length; i < length; i++) { |
449 |
hash = Util.combineHashCodes(hash, this.parameterTypes[i].hashCode()); |
459 |
hash = Util.combineHashCodes(hash, Signature.getTypeErasure(this.parameterTypes[i]).hashCode()); |
450 |
} |
460 |
} |
451 |
return hash; |
461 |
return hash; |
452 |
} |
462 |
} |