Package randoop.output
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 Summary
Modifier and TypeMethodDescriptionwriteClassCode
(String packageName, String classname, String classCode) Writes the given class using thisCodeWriter
.writeUnmodifiedClassCode
(String packageName, String classname, String classCode) Writes the given class.
-
Method Details
-
writeClassCode
Path writeClassCode(String packageName, String classname, String classCode) throws RandoopOutputException Writes the given class using thisCodeWriter
. May modify the class text before writing it. May write additional files (but those are not returned).- Parameters:
packageName
- the package name of the classclassname
- the simple name of the classclassCode
- 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 classclassname
- the simple name of the classclassCode
- 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
-