// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/Log.java
// public static void debug(String message) {
//     if(DEBUG) {
//         log.log(status(Status.INFO, "[DEBUG] " + message));
//     }
// }
// 
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/project/IDEAndroidProject.java
// public interface IDEAndroidProject {
// 
//     public boolean isAndroidProject();
// 
//     public boolean isLibrary();
// 
//     public IProject getProject();
// 
//     public void setAndroidProject(boolean androidProject);
// 
//     public void setLibrary(boolean isLibrary);
// 
//     public void setLibraryDependencies(List<IDEAndroidProject> dependencies);
// 
//     public void fixProject();
// 
//     public boolean isMavenised();
// 
//     public IFile getPom();
// 
//     public void setAssetsDirectory(File file);
//  
//     public void setResourceFolder(File resourceDirectory);
//     
//     public void setAndroidManifest(File androidManifestFile);
// 
//     public Classpath getClasspath();
//     
//     public boolean shouldResolveWorkspaceProjects();
// 
//     public String getPath();
// 
//     public void orderBuilders();
// 
// }
// 
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/project/MavenAndroidProject.java
// public interface MavenAndroidProject {
// 
//     public String getName();
// 
//     public String getGroup();
// 
//     public String getVersion();
// 
//     public boolean isAndroidProject();
// 
//     public boolean isLibrary();
// 
//     public List<Dependency> getNonRuntimeDependencies();
// 
//     public List<Dependency> getLibraryDependencies();
// 
//     public File getAssetsDirectory();
// 
//     public File getResourceFolder();
// 
//     public File getAndroidManifestFile();
//     
//     public File getDestinationManifestFile();
// 
//     public List<String> getPlatformProvidedDependencies();
// 
//     public List<String> getSourcePaths();
//     
//     public String getOutputDirectory();
// 
//     public boolean isIgnoreOptionalWarningsInGenFolder();
// 
//     public List<String> getTestSourcePaths();
// 
//     public List<String> getResourcePaths();
// 
//     public List<String> getTestResourcePaths();
// 
// }


import static com.google.common.collect.Lists.newArrayList;
import static me.gladwell.eclipse.m2e.android.Log.debug;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.List;
import me.gladwell.eclipse.m2e.android.project.IDEAndroidProject;
import me.gladwell.eclipse.m2e.android.project.MavenAndroidProject;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IAccessRule;
import org.eclipse.jdt.core.IClasspathAttribute;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import com.google.inject.Inject;
import com.google.inject.Singleton;

        IAccessRule getAccessRule() {
            return JavaCore.newAccessRule(pattern, kind);
        }
    }

    /**
     * An IPath replacement used for object serialization
     */
    static final class PathReplace implements Serializable {
        private static final long serialVersionUID = -2361259525684491181L;

        private final String path;

        PathReplace(IPath path) {
            this.path = path.toPortableString();
        }

        IPath getPath() {
            return Path.fromPortableString(path);
        }
    }

    private final File stateLocation;

    @Inject
    public ObjectSerializationClasspathPersister(File stateLocation) {
        this.stateLocation = stateLocation;
    }

// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/Log.java
// public static void debug(String message) {
//     if(DEBUG) {
//         log.log(status(Status.INFO, "[DEBUG] " + message));
//     }
// }
// 
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/project/IDEAndroidProject.java
// public interface IDEAndroidProject {
// 
//     public boolean isAndroidProject();
// 
//     public boolean isLibrary();
// 
//     public IProject getProject();
// 
//     public void setAndroidProject(boolean androidProject);
// 
//     public void setLibrary(boolean isLibrary);
// 
//     public void setLibraryDependencies(List<IDEAndroidProject> dependencies);
// 
//     public void fixProject();
// 
//     public boolean isMavenised();
// 
//     public IFile getPom();
// 
//     public void setAssetsDirectory(File file);
//  
//     public void setResourceFolder(File resourceDirectory);
//     
//     public void setAndroidManifest(File androidManifestFile);
// 
//     public Classpath getClasspath();
//     
//     public boolean shouldResolveWorkspaceProjects();
// 
//     public String getPath();
// 
//     public void orderBuilders();
// 
// }
// 
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/project/MavenAndroidProject.java
// public interface MavenAndroidProject {
// 
//     public String getName();
// 
//     public String getGroup();
// 
//     public String getVersion();
// 
//     public boolean isAndroidProject();
// 
//     public boolean isLibrary();
// 
//     public List<Dependency> getNonRuntimeDependencies();
// 
//     public List<Dependency> getLibraryDependencies();
// 
//     public File getAssetsDirectory();
// 
//     public File getResourceFolder();
// 
//     public File getAndroidManifestFile();
//     
//     public File getDestinationManifestFile();
// 
//     public List<String> getPlatformProvidedDependencies();
// 
//     public List<String> getSourcePaths();
//     
//     public String getOutputDirectory();
// 
//     public boolean isIgnoreOptionalWarningsInGenFolder();
// 
//     public List<String> getTestSourcePaths();
// 
//     public List<String> getResourcePaths();
// 
//     public List<String> getTestResourcePaths();
// 
// }


// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/configuration/ObjectSerializationClasspathPersister.java
import static com.google.common.collect.Lists.newArrayList;
import static me.gladwell.eclipse.m2e.android.Log.debug;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.List;
import me.gladwell.eclipse.m2e.android.project.IDEAndroidProject;
import me.gladwell.eclipse.m2e.android.project.MavenAndroidProject;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IAccessRule;
import org.eclipse.jdt.core.IClasspathAttribute;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import com.google.inject.Inject;
import com.google.inject.Singleton;


        IAccessRule getAccessRule() {
            return JavaCore.newAccessRule(pattern, kind);
        }
    }

    /**
     * An IPath replacement used for object serialization
     */
    static final class PathReplace implements Serializable {
        private static final long serialVersionUID = -2361259525684491181L;

        private final String path;

        PathReplace(IPath path) {
            this.path = path.toPortableString();
        }

        IPath getPath() {
            return Path.fromPortableString(path);
        }
    }

    private final File stateLocation;

    @Inject
    public ObjectSerializationClasspathPersister(File stateLocation) {
        this.stateLocation = stateLocation;
    }

    public void save(MavenAndroidProject mavenProject, IDEAndroidProject eclipseProject, Iterable<IClasspathEntry> classpath) {