void (@NotNull PsiNewExpression expression) { super.visitNewExpression(expression); PsiJavaCodeReferenceElement classRef = expression.getClassReference(); if (expression.getQualifier() == null && classRef != null && classRef.resolve() instanceof PsiClass cls && !cls.hasModifierProperty(PsiModifier.STATIC) && !ClassUtil.isTopLevelClass(cls)) { canBeStatic = false; stopWalking(); } }