package org.jetbrains.jps.model.serialization;

import org.jdom.Element;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jps.model.JpsCompositeElement;
import org.jetbrains.jps.model.JpsElementReference;
import org.jetbrains.jps.model.JpsProject;
import org.jetbrains.jps.model.artifact.JpsArtifactType;
import org.jetbrains.jps.model.module.JpsDependencyElement;
import org.jetbrains.jps.model.module.JpsModule;
import org.jetbrains.jps.model.serialization.artifact.JpsPackagingElementLoader;
import org.jetbrains.jps.model.serialization.facet.JpsModuleExtensionLoader;
import org.jetbrains.jps.service.JpsServiceManager;

import java.util.Collections;
import java.util.List;

/**
 * @author nik
 */
public abstract class JpsModelSerializerExtension {
  public static Iterable<JpsModelSerializerExtension> getExtensions() {
    return JpsServiceManager.getInstance().getExtensions(JpsModelSerializerExtension.class);
  }

  public void loadRootModel(@NotNull JpsModule module, @NotNull Element rootModel) {
  }

  public void saveRootModel(@NotNull JpsModule module, @NotNull Element rootModel) {
  }

  public void loadProjectRoots(JpsProject project, Element rootManagerElement) {
  }

  public void saveProjectRoots(JpsProject project, Element rootManagerElement) {
  }

  public List<JpsLibraryRootTypeSerializer> getLibraryRootTypeSerializers() {
    return Collections.emptyList();
  }

  @NotNull
  public List<JpsLibraryRootTypeSerializer> getSdkRootTypeSerializers() {
    return Collections.emptyList();
  }

  public void loadModuleDependencyProperties(JpsDependencyElement dependency, Element orderEntry) {
  }

  public void saveModuleDependencyProperties(JpsDependencyElement dependency, Element orderEntry) {
  }

  @Nullable
  public JpsElementReference<? extends JpsCompositeElement> createLibraryTableReference(String tableLevel) {
    return null;
  }

  public String getLibraryTableLevelId(JpsElementReference<? extends JpsCompositeElement> reference) {
    return null;
  }

  @NotNull
  public List<? extends JpsModulePropertiesSerializer<?>> getModulePropertiesSerializers() {
    return Collections.emptyList();
  }

  @NotNull
  public List<JpsLibraryPropertiesSerializer<?>> getLibraryPropertiesLoaders() {
    return Collections.emptyList();
  }

  @NotNull
  public List<? extends JpsSdkPropertiesSerializer<?>> getSdkPropertiesLoaders() {
    return Collections.emptyList();
  }

  public List<? extends JpsModuleExtensionLoader<?>> getModuleExtensionLoaders() {
    return Collections.emptyList();
  }

  public List<? extends JpsPackagingElementLoader<?>> getPackagingElementLoaders() {
    return Collections.emptyList();
  }

  @Nullable
  public JpsArtifactType getArtifactType(@NotNull String typeId) {
    return null;
  }
}

@@ -2211,32 +2211,42 @@
 l%0A  public List%3C
+? extends 
 JpsLibraryProper

fix getLibraryPropertiesLoaders() signature