void (PsiClass psiClass, boolean isStatic) { for (PsiElement element = psiClass.getFirstChild(); element != null; element = element.getNextSibling()) { if (element instanceof PsiField field && !field.hasInitializer() && field.hasModifierProperty(PsiModifier.STATIC) == isStatic) { visitField(field); } } if (!isStatic && ContainerUtil.exists(ImplicitUsageProvider.EP_NAME.getExtensionList(), p -> p.isClassWithCustomizedInitialization(psiClass))) { addInstruction(new EscapeInstruction(Collections.singleton(ThisDescriptor.createThisValue(getFactory(), psiClass)))); addInstruction(new FlushFieldsInstruction()); } for (PsiElement element = psiClass.getFirstChild(); element != null; element = element.getNextSibling()) { if ((element instanceof PsiField field && field.hasInitializer() || element instanceof PsiClassInitializer) && ((PsiMember)element).hasModifierProperty(PsiModifier.STATIC) == isStatic) { element.accept(this); } } if (!isStatic) { addInstruction(new EndOfInstanceInitializerInstruction()); } addInstruction(new FlushFieldsInstruction()); }