void (@NotNull PsiElement element) { if (element instanceof PsiMethod || element instanceof PsiReferenceParameterList || element instanceof PsiTypeElement || element instanceof PsiLambdaExpression) { return; } PsiClass targetClass = extractClass(element); if (targetClass != null && targetClass.isInheritor(baseClass, true) && !hasSingleInitializationPlace(targetClass)) { PsiElement problemElement = calcProblemElement(element); if (problemElement != null) { result.set(Pair.create(problemElement, targetClass)); } } super.visitElement(element); }