Interface CodeWriter

All Known Implementing Classes:
FailingAssertionCommentWriter, JavaFileWriter, MinimizerWriter

public interface CodeWriter
Interface for a method writeClassCode that writes a class to a file.
  • Method Details

    • writeClassCode

      Path writeClassCode(String packageName, String classname, String classCode) throws RandoopOutputException
      Writes the given class using this CodeWriter. May modify the class text before writing it. May write additional files (but those are not returned).
      Parameters:
      packageName - the package name of the class
      classname - the simple name of the class
      classCode - the text of a Java class, must be compilable
      Returns:
      the Path object for the Java file written
      Throws:
      RandoopOutputException - if there is an error while writing the code
    • writeUnmodifiedClassCode

      Path writeUnmodifiedClassCode(String packageName, String classname, String classCode) throws RandoopOutputException
      Writes the given class. Does not modify the class text.
      Parameters:
      packageName - the package name of the class
      classname - the simple name of the class
      classCode - the text of the class to be written, must be compilable
      Returns:
      the Path object for the Java file written
      Throws:
      RandoopOutputException - if there is an error while writing the code