private static void addFacets(JpsModule module, List<FacetState> facets, @Nullable final JpsElement parentFacet) {
    for (FacetState facetState : facets) {
      final JpsFacetConfigurationSerializer<?> serializer = getModuleExtensionSerializer(facetState.getFacetType());
      if (serializer != null) {
        final JpsElement element = addExtension(module, serializer, facetState, parentFacet);
        addFacets(module, facetState.subFacets, element);
      }
    }
  }
private static void addFacets(JpsModule module, List<FacetState> facets, @Nullable final JpsElement parentFacet)