Class ReportCreator
java.lang.Object
de.monticore.generating.templateengine.reporting.commons.ReportCreator
Helper to write files
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReportCreator(String outputDir) Constructor for mc.codegen.reporting.commons.Reporting -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseAll()Closes all open filesvoidCloses the given filecreateFile(String fileName, String fileextension) Creates a file with the given name and fileextension.booleandeleteFile(String fileName, String fileextension) Removes the file with the given name and extensionprotected FileReturns a file object for the given qualified name and fileextensionvoidOpens a filevoidwriteLineToFile(File file, String content) Writes a single line to an open file
-
Field Details
-
writers
-
outputDir
-
-
Constructor Details
-
ReportCreator
Constructor for mc.codegen.reporting.commons.Reporting- Parameters:
outputDir- dot separated outputDir to the output directory
-
-
Method Details
-
createFile
Creates a file with the given name and fileextension.- Parameters:
fileName- name of the file to createfileextension- extension (filetype) of the file to create- Returns:
- file
- Throws:
IOException
-
openFile
Opens a file- Parameters:
file-- Throws:
IOException
-
writeLineToFile
Writes a single line to an open file- Parameters:
file-content-- Throws:
IOException
-
closeFile
Closes the given file- Parameters:
file-- Throws:
IOException
-
closeAll
Closes all open files- Throws:
IOException
-
deleteFile
Removes the file with the given name and extension- Parameters:
fileName-fileextension-- Returns:
- true if file has been deleted, false if file could not be deleted or does not exists
-
getFile
Returns a file object for the given qualified name and fileextension- Parameters:
fileName- dot separated namefileextension-- Returns:
-