Class TemplateFile


  • public class TemplateFile
    extends java.lang.Object
    Simple template engine Syntax for replace variable with value: '{{variable}}'
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.String name, @Nullable java.lang.Object value)  
      java.lang.String build()  
      static TemplateFile fromResources​(java.lang.String path)  
      void save​(java.io.File outFile)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • fromResources

        public static TemplateFile fromResources​(java.lang.String path)
                                          throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
      • add

        public void add​(java.lang.String name,
                        @Nullable
                        @Nullable java.lang.Object value)
      • build

        public java.lang.String build()
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • save

        public void save​(java.io.File outFile)
                  throws java.io.IOException
        Throws:
        java.io.IOException