boolean (@NotNull PsiClass psiClass) { if (psiClass instanceof PsiTypeParameter || psiClass.hasModifierProperty(PsiModifier.PRIVATE) || psiClass.hasModifierProperty(PsiModifier.ABSTRACT)) { return false; } if (psiClass.getContainingClass() != null && !psiClass.hasModifierProperty(PsiModifier.STATIC)) { return false; } PsiMethod[] constructors = psiClass.getConstructors(); if (constructors.length == 0) return true; for (PsiMethod constructor : constructors) { int parametersCount = constructor.getParameterList().getParametersCount(); if (parametersCount <= 1) { return true; } } return false; }