void (@NotNull PsiMethodCallExpression call) { super.visitMethodCallExpression(call); final PsiReferenceExpression methodExpression = call.getMethodExpression(); final String referenceName = methodExpression.getReferenceName(); if (referenceName == null || PropertyUtilBase.getMethodNameGetterFlavour(referenceName) == PropertyUtilBase.GetterFlavour.NOT_A_GETTER) { return; } final PsiElement parent = call.getParent(); if (parent instanceof PsiExpressionStatement) { // inlining a top-level getter call would break code return; } final PsiClass containingClass = ClassUtils.getContainingClass(call); if (containingClass == null) { return; } final PsiMethod method = call.resolveMethod(); if (method == null) { return; } if (!containingClass.equals(method.getContainingClass())) { return; } final PsiExpression qualifier = methodExpression.getQualifierExpression(); if (qualifier != null && !(qualifier instanceof PsiThisExpression)) { if (ignoreGetterCallsOnOtherObjects) { return; } final PsiClass qualifierClass = PsiUtil.resolveClassInClassTypeOnly(qualifier.getType()); if (!containingClass.equals(qualifierClass)) { return; } } final PsiField field = PropertyUtil.getFieldOfGetter(method); if (field == null) { return; } final PsiMember member = PsiTreeUtil.getParentOfType(call, PsiMember.class); if (member instanceof PsiField && !(member instanceof PsiEnumConstant) && member.getTextOffset() < field.getTextOffset()) { return; } if (onlyReportPrivateGetter && !method.hasModifierProperty(PsiModifier.PRIVATE)) { return; } final PsiMethod overridingMethod = OverridingMethodsSearch.search(method).findFirst(); if (overridingMethod != null) { return; } registerMethodCallError(call); }