Package: groovy.text

## [Java] Class TemplateEngine

- groovy.text.TemplateEngine

-     public abstract class TemplateEngine
      extends Object

  A template engine is a factory for creating a Template instance for a given text input.

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public abstract Template` | `createTemplate(Reader reader)` Creates a template by reading content from the Reader.
    `` | `public Template` | `createTemplate(String templateText)` Creates a template from the String contents.
    `` | `public Template` | `createTemplate(File file)` Creates a template from the File contents.
    `` | `public Template` | `createTemplate(File file, Charset cs)` Creates a template from the File contents using the given charset encoding.
    `` | `public Template` | `createTemplate(URL url)` Creates a template from the content found at the URL using the default encoding.
    `` | `public Template` | `createTemplate(URL url, Charset cs)` Creates a template from the content found at the URL using the given charset encoding.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Method Detail

    - #### public abstract Template createTemplate(Reader reader)

      Creates a template by reading content from the Reader.

    - #### public Template createTemplate(String templateText)

      Creates a template from the String contents.

    - #### public Template createTemplate(File file)

      Creates a template from the File contents. If the encoding for the file can be determined, that encoding will be used, otherwise the default encoding will be used. Consider using createTemplate(File, Charset) if you need to explicitly set the encoding.

    - #### public Template createTemplate(File file, Charset cs)

      Creates a template from the File contents using the given charset encoding.

    - #### @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "DM_DEFAULT_ENCODING", justification = "left for legacy reasons but users expected to heed warning") public Template createTemplate(URL url)

      Creates a template from the content found at the URL using the default encoding. Please consider using createTemplate(URL, Charset).

    - #### public Template createTemplate(URL url, Charset cs)

      Creates a template from the content found at the URL using the given charset encoding.