private void setupModifiers(@NotNull PsiClass aClass) {
    if (!myTargetClass.isInterface()) {
      PsiUtil.setModifierProperty(aClass, PsiModifier.PRIVATE, true);
      if (aClass.isInterface() || aClass.isEnum() || aClass.isRecord()) {
        // always implicitly static
        return;
      }
      PsiModifierListOwner owner = PsiTreeUtil.getParentOfType(myAnonOrLocalClass, PsiModifierListOwner.class);
      if (owner != null && owner.hasModifierProperty(PsiModifier.STATIC) || myMakeStatic) {
        PsiUtil.setModifierProperty(aClass, PsiModifier.STATIC, true);
      }
    } else {
      PsiUtil.setModifierProperty(aClass, PsiModifier.PACKAGE_LOCAL, true);
    }
  }
private void setupModifiers(@NotNull PsiClass aClass)