void (@NotNull PsiReferenceExpression expression) { if (myUnusedFields.isEmpty() && myUnusedMethods.isEmpty()) { return; } super.visitReferenceExpression(expression); final PsiElement target = expression.resolve(); if (target instanceof PsiField field) { myUnusedFields.remove(field); } else if (target instanceof PsiMethod method) { if (usesReflection(method)) { myUnusedFields.clear(); myUnusedMethods.clear(); } else { myUnusedMethods.remove(method); final PsiField field = PropertyUtilBase.findPropertyFieldByMember(method); myUnusedFields.remove(field); } } }