Interface FileService

All Known Implementing Classes:
FileServiceImpl

public interface FileService
  • Method Details

    • generateFile

      default void generateFile(Generable generable, boolean overwriteFiles)
    • generateFile

      default void generateFile(Generable generable, String template, boolean overwriteFiles)
    • createClassFile

      default void createClassFile(String classPackage, String className, String template, Object context, boolean overwriteFiles)
    • createFileWithContent

      void createFileWithContent(File file, String content, boolean overwriteFiles)
      Creates a file, its parent directory and adds contents to it.
      Parameters:
      file - The File to write.
      content - The contents of the file.
      overwriteFiles - Flag indicating if existing files should be overwritten.
    • createFileFromTemplate

      void createFileFromTemplate(File file, String template, Object context, boolean overwriteFiles)
      Creates a file, its parent directory and adds contents to it. The contents are created from a template and a context.
      Parameters:
      file - The File to write.
      template - The name of the template of the content of the file.
      context - The context which, provided to the template, will form the content of the file.
      overwriteFiles - Flag indicating if existing files should be overwritten.