boolean (PsiClass aClass) { final Query<PsiReference> query = ReferencesSearch.search(aClass, aClass.getUseScope()); return query.anyMatch(ref -> ref != null && ref.getElement().getParent() instanceof PsiNewExpression); }