MarkupTemplateEngine (Groovy 4.0.15)

Package: groovy.text.markup

## [Java] Class MarkupTemplateEngine

- groovy.text.markup.MarkupTemplateEngine

-     public class MarkupTemplateEngine
      extends TemplateEngine

  A template engine which leverages StreamingMarkupBuilder to generate XML/XHTML.

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `static class` | `MarkupTemplateEngine.CachingTemplateResolver` | A template resolver which avoids calling ClassLoader.getResource if a template path already has been queried before.
    `static class` | `MarkupTemplateEngine.DefaultTemplateResolver` |
    `static class` | `MarkupTemplateEngine.TemplateResource` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `MarkupTemplateEngine()`
    `MarkupTemplateEngine(TemplateConfiguration config)`
    `MarkupTemplateEngine(ClassLoader parentLoader, TemplateConfiguration config)`
    `MarkupTemplateEngine(ClassLoader parentLoader, TemplateConfiguration config, TemplateResolver resolver)`
    `MarkupTemplateEngine(ClassLoader parentLoader, File templateDirectory, TemplateConfiguration tplConfig)` Convenience constructor to build a template engine which searches for templates into a directory

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `call(SourceUnit source, GeneratorContext context, ClassNode classNode)`
    `` | `public Template` | `createTemplate(Reader reader)`
    `` | `public Template` | `createTemplate(Reader reader, String sourceName)`
    `` | `public Template` | `createTemplate(URL resource)`
    `` | `public Template` | `createTemplateByPath(String templatePath)`
    `` | `public Template` | `createTypeCheckedModelTemplate(String source, Map<String, String> modelTypes)`
    `` | `public Template` | `createTypeCheckedModelTemplate(String source, String sourceName, Map<String, String> modelTypes)`
    `` | `public Template` | `createTypeCheckedModelTemplate(Reader reader, Map<String, String> modelTypes)`
    `` | `public Template` | `createTypeCheckedModelTemplate(Reader reader, String sourceName, Map<String, String> modelTypes)`
    `` | `public Template` | `createTypeCheckedModelTemplate(URL resource, Map<String, String> modelTypes)`
    `` | `public Template` | `createTypeCheckedModelTemplateByPath(String templatePath, Map<String, String> modelTypes)`
    `` | `public CompilerConfiguration` | `getCompilerConfiguration()`
    `` | `public TemplateConfiguration` | `getTemplateConfiguration()`
    `` | `public GroovyClassLoader` | `getTemplateLoader()`
    `` | `public URL` | `resolveTemplate(String templatePath)`
    `` | `public URLClassLoader` | `run()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class TemplateEngine` | `createTemplate, createTemplate, createTemplate, createTemplate, createTemplate, createTemplate`

- - ### Constructor Detail

    - #### public MarkupTemplateEngine()

    - #### public MarkupTemplateEngine(TemplateConfiguration config)

    - #### public MarkupTemplateEngine(ClassLoader parentLoader, TemplateConfiguration config)

    - #### public MarkupTemplateEngine(ClassLoader parentLoader, TemplateConfiguration config, TemplateResolver resolver)

    - #### public MarkupTemplateEngine(ClassLoader parentLoader, File templateDirectory, TemplateConfiguration tplConfig)

      Convenience constructor to build a template engine which searches for templates into a directory

      Parameters:
        `templateDirectory` - directory where to find templates
        `tplConfig` - template engine configuration

  - ### Method Detail

    - #### @Override
      public void call(SourceUnit source, GeneratorContext context, ClassNode classNode)

    - #### @Override
      public Template createTemplate(Reader reader)

    - #### public Template createTemplate(Reader reader, String sourceName)

    - #### @Override
      public Template createTemplate(URL resource)

    - #### public Template createTemplateByPath(String templatePath)

    - #### public Template createTypeCheckedModelTemplate(String source, Map<String, String> modelTypes)

    - #### public Template createTypeCheckedModelTemplate(String source, String sourceName, Map<String, String> modelTypes)

    - #### public Template createTypeCheckedModelTemplate(Reader reader, Map<String, String> modelTypes)

    - #### public Template createTypeCheckedModelTemplate(Reader reader, String sourceName, Map<String, String> modelTypes)

    - #### public Template createTypeCheckedModelTemplate(URL resource, Map<String, String> modelTypes)

    - #### public Template createTypeCheckedModelTemplateByPath(String templatePath, Map<String, String> modelTypes)

    - #### public CompilerConfiguration getCompilerConfiguration()

    - #### public TemplateConfiguration getTemplateConfiguration()

    - #### public GroovyClassLoader getTemplateLoader()

    - #### public URL resolveTemplate(String templatePath)

    - #### @Override
      public URLClassLoader run()