Lines 389-406
Link Here
|
389 |
/* (non-Javadoc) |
389 |
/* (non-Javadoc) |
390 |
* @see IMethodBinding#overrides(IMethodBinding) |
390 |
* @see IMethodBinding#overrides(IMethodBinding) |
391 |
*/ |
391 |
*/ |
392 |
public boolean overrides(IMethodBinding method) { |
392 |
public boolean overrides(IMethodBinding overridenMethod) { |
393 |
org.eclipse.jdt.internal.compiler.lookup.MethodBinding otherCompilerBinding = ((MethodBinding) method).binding; |
393 |
org.eclipse.jdt.internal.compiler.lookup.MethodBinding overridenCompilerBinding = ((MethodBinding) overridenMethod).binding; |
394 |
if (this.binding == otherCompilerBinding) |
394 |
if (this.binding == overridenCompilerBinding) |
395 |
return false; |
395 |
return false; |
396 |
if (!CharOperation.equals(this.binding.selector, otherCompilerBinding.selector)) |
396 |
if (!CharOperation.equals(this.binding.selector, overridenCompilerBinding.selector)) |
397 |
return false; |
397 |
return false; |
398 |
if (!this.binding.declaringClass.isCompatibleWith(otherCompilerBinding.declaringClass)) |
398 |
ReferenceBinding match = this.binding.declaringClass.findSuperTypeWithSameErasure(overridenCompilerBinding.declaringClass); |
399 |
return false; |
399 |
if (match == null) return false; |
400 |
LookupEnvironment lookupEnvironment = this.resolver.lookupEnvironment(); |
400 |
|
401 |
if (lookupEnvironment == null) return false; |
401 |
org.eclipse.jdt.internal.compiler.lookup.MethodBinding[] superMethods = match.methods(); |
402 |
MethodVerifier methodVerifier = lookupEnvironment.methodVerifier(); |
402 |
for (int i = 0, length = superMethods.length; i < length; i++) { |
403 |
return methodVerifier.doesMethodOverride(this.binding, otherCompilerBinding); |
403 |
if (superMethods[i].original() == overridenCompilerBinding) { |
|
|
404 |
LookupEnvironment lookupEnvironment = this.resolver.lookupEnvironment(); |
405 |
if (lookupEnvironment == null) return false; |
406 |
MethodVerifier methodVerifier = lookupEnvironment.methodVerifier(); |
407 |
return methodVerifier.doesMethodOverride(this.binding, superMethods[i]); |
408 |
} |
409 |
} |
410 |
return false; |
404 |
} |
411 |
} |
405 |
|
412 |
|
406 |
/* |
413 |
/* |