java.lang.Object
de.monticore.generating.templateengine.reporting.commons.ReportCreator

public class ReportCreator extends Object
Helper to write files
  • Field Details

  • Constructor Details

    • ReportCreator

      public ReportCreator(String outputDir)
      Constructor for mc.codegen.reporting.commons.Reporting
      Parameters:
      outputDir - dot separated outputDir to the output directory
  • Method Details

    • createFile

      public File createFile(String fileName, String fileextension) throws IOException
      Creates a file with the given name and fileextension.
      Parameters:
      fileName - name of the file to create
      fileextension - extension (filetype) of the file to create
      Returns:
      file
      Throws:
      IOException
    • openFile

      public void openFile(File file) throws IOException
      Opens a file
      Parameters:
      file -
      Throws:
      IOException
    • writeLineToFile

      public void writeLineToFile(File file, String content) throws IOException
      Writes a single line to an open file
      Parameters:
      file -
      content -
      Throws:
      IOException
    • closeFile

      public void closeFile(File file) throws IOException
      Closes the given file
      Parameters:
      file -
      Throws:
      IOException
    • closeAll

      public void closeAll() throws IOException
      Closes all open files
      Throws:
      IOException
    • deleteFile

      public boolean deleteFile(String fileName, String fileextension)
      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

      protected File getFile(String fileName, String fileextension)
      Returns a file object for the given qualified name and fileextension
      Parameters:
      fileName - dot separated name
      fileextension -
      Returns: