Class GeneratedFile

java.lang.Object
net.agilhard.maven.plugins.jpacktool.base.template.GeneratedFile

public class GeneratedFile
extends java.lang.Object
File to be generated by freemarker.
  • Constructor Summary

    Constructors 
    Constructor Description
    GeneratedFile​(freemarker.template.Configuration cfg, java.util.Map model, java.lang.String templateName, java.io.File outputFile)
    Creates a file to be generated.
  • Method Summary

    Modifier and Type Method Description
    void generate()
    Generates the file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GeneratedFile

      public GeneratedFile​(freemarker.template.Configuration cfg, java.util.Map model, java.lang.String templateName, java.io.File outputFile)
      Creates a file to be generated.
      Parameters:
      cfg - the freemarker configuration
      model - the freemarker model
      templateName - the name of the freemarker template
      outputFile - the output file
  • Method Details

    • generate

      public void generate() throws java.io.IOException, freemarker.template.TemplateException
      Generates the file.
      Throws:
      java.io.IOException - if writing to file failed
      freemarker.template.TemplateException - if some template error