@Override
  public Element getState() {
    Element state = new Element("state");
    XmlSerializer.serializeInto(myState, state, new SkipDefaultValuesSerializationFilters());

    if (!myAddNotNullAssertions) {
      addChild(state, JpsJavaCompilerConfigurationSerializer.ADD_NOTNULL_ASSERTIONS).setAttribute(
        JpsJavaCompilerConfigurationSerializer.ENABLED, String.valueOf(myAddNotNullAssertions));
    }

    if (myExcludesConfiguration.getExcludeEntryDescriptions().length > 0) {
      myExcludesConfiguration.writeExternal(addChild(state, JpsJavaCompilerConfigurationSerializer.EXCLUDE_FROM_COMPILE));
    }

    Element resourceExtensions = new Element(JpsJavaCompilerConfigurationSerializer.RESOURCE_EXTENSIONS);
    for (String pattern : getRegexpPatterns()) {
      addChild(resourceExtensions, JpsJavaCompilerConfigurationSerializer.ENTRY).setAttribute(JpsJavaCompilerConfigurationSerializer.NAME, pattern);
    }
    if (!JDOMUtil.isEmpty(resourceExtensions)) {
      state.addContent(resourceExtensions);
    }

    if ((myWildcardPatternsInitialized || !myWildcardPatterns.isEmpty()) &&
        !DEFAULT_WILDCARD_PATTERNS.equals(myWildcardPatterns)) {
      final Element wildcardPatterns = addChild(state, JpsJavaCompilerConfigurationSerializer.WILDCARD_RESOURCE_PATTERNS);
      for (final String wildcardPattern : myWildcardPatterns) {
        addChild(wildcardPatterns, JpsJavaCompilerConfigurationSerializer.ENTRY)
          .setAttribute(JpsJavaCompilerConfigurationSerializer.NAME, wildcardPattern);
      }
    }

    Element annotationProcessingSettings = new Element(JpsJavaCompilerConfigurationSerializer.ANNOTATION_PROCESSING);

    Element profileElement = new Element("profile");
    profileElement.setAttribute("default", "true");
    AnnotationProcessorProfileSerializer.writeExternal(myDefaultProcessorsProfile, profileElement);
    if (!JDOMUtil.isEmpty(profileElement, 2)) {
      annotationProcessingSettings.addContent(profileElement);
    }

    for (ProcessorConfigProfile profile : myModuleProcessorProfiles) {
      Element element = new Element("profile");
      AnnotationProcessorProfileSerializer.writeExternal(profile, element);
      annotationProcessingSettings.addContent(element);
    }

    if (!JDOMUtil.isEmpty(annotationProcessingSettings)) {
      state.addContent(annotationProcessingSettings);
    }

    List<String> moduleNames = getFilteredModuleNameList(myProject, myModuleBytecodeTarget, false);
    if (!StringUtil.isEmpty(myBytecodeTargetLevel) || !moduleNames.isEmpty()) {
      final Element bytecodeTarget = new Element(JpsJavaCompilerConfigurationSerializer.BYTECODE_TARGET_LEVEL);
      state.addContent(bytecodeTarget);
      if (!StringUtil.isEmpty(myBytecodeTargetLevel)) {
        bytecodeTarget.setAttribute(JpsJavaCompilerConfigurationSerializer.TARGET_ATTRIBUTE, myBytecodeTargetLevel);
      }
      writeBytecodeTarget(moduleNames, myModuleBytecodeTarget, bytecodeTarget);
    }
    return state;
  }
@Override
  public Element getState()