package org.sugarj.cleardep;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

import org.sugarj.cleardep.stamp.Stamper;
import org.sugarj.common.path.Path;

public class SimpleCompilationUnit extends CompilationUnit {
  private static final long serialVersionUID = -83007451176964292L;

  @Override
  protected boolean isConsistentExtend() {
    return true;
  }
  
  @Override
  protected void writeEntity(ObjectOutputStream oos) throws IOException {
    super.writeEntity(oos);
    oos.writeObject(getMode());
  }
  
  @Override
  protected void readEntity(ObjectInputStream ois) throws IOException, ClassNotFoundException {
    super.readEntity(ois);
    mode = (Mode<?>) ois.readObject();
  }

  public static SimpleCompilationUnit create(Stamper stamper, SimpleMode mode, Synthesizer syn, Path dep) throws IOException {
    return CompilationUnit.create(SimpleCompilationUnit.class, stamper, mode, syn, dep);
  }
}
@@ -120,16 +120,78 @@
 Stream;%0A
+import java.util.Map;%0A%0Aimport org.sugarj.cleardep.stamp.Stamp;
 %0Aimport 
@@ -801,16 +801,487 @@
 t();%0A  %7D
+%0A  %0A  public static SimpleCompilationUnit readConsistent(Mode%3CSimpleCompilationUnit%3E mode, Map%3C? extends Path, Stamp%3E editedSourceFiles, Path... deps) throws IOException %7B%0A    return CompilationUnit.readConsistent(SimpleCompilationUnit.class, mode, editedSourceFiles, deps);%0A  %7D%0A  %0A  public static SimpleCompilationUnit read(Mode%3CSimpleCompilationUnit%3E mode, Path... deps) throws IOException %7B%0A    return CompilationUnit.read(SimpleCompilationUnit.class, mode, deps);%0A  %7D
 %0A%0A  publ

read simple CU