void (@NotNull PsiReferenceExpression expression) { super.visitReferenceExpression(expression); PsiElement resolved = expression.resolve(); if (resolved instanceof PsiMethod || resolved instanceof PsiField) { ContainerUtil.addAllNotNull(elementsToCheck, resolved); } }