PsiMethod (@Nullable PsiType qualifierType) { if (myTargetMethod == null || qualifierType == null || !PsiUtil.canBeOverridden(myTargetMethod)) return myTargetMethod; PsiExpression qualifierExpression = null; if (myContext instanceof PsiMethodCallExpression) { qualifierExpression = ((PsiMethodCallExpression)myContext).getMethodExpression().getQualifierExpression(); } else if (myContext instanceof PsiMethodReferenceExpression) { qualifierExpression = ((PsiMethodReferenceExpression)myContext).getQualifierExpression(); } if (qualifierExpression instanceof PsiSuperExpression) return myTargetMethod; // non-virtual call return MethodUtils.findSpecificMethod(myTargetMethod, qualifierType); }