Package groovy.text.markup
Class MarkupTemplateEngine.DefaultTemplateResolver
java.lang.Object
groovy.text.markup.MarkupTemplateEngine.DefaultTemplateResolver
- All Implemented Interfaces:
TemplateResolver
- Direct Known Subclasses:
MarkupTemplateEngine.CachingTemplateResolver
- Enclosing class:
- MarkupTemplateEngine
public static class MarkupTemplateEngine.DefaultTemplateResolver
extends Object
implements TemplateResolver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(ClassLoader templateClassLoader, TemplateConfiguration configuration) This method is called once the template engine is initialized, providing the resolver with the template engine configuration and its template class loader.resolveTemplate(String templatePath) Resolvers must implement this method in order to resolve a template, given a template path.
-
Constructor Details
-
DefaultTemplateResolver
public DefaultTemplateResolver()
-
-
Method Details
-
configure
Description copied from interface:TemplateResolverThis method is called once the template engine is initialized, providing the resolver with the template engine configuration and its template class loader.- Specified by:
configurein interfaceTemplateResolver- Parameters:
templateClassLoader- the classloader where templates will be searched forconfiguration- the configuration of the template engine
-
resolveTemplate
Description copied from interface:TemplateResolverResolvers must implement this method in order to resolve a template, given a template path. They must return a valid URL or an IOException.- Specified by:
resolveTemplatein interfaceTemplateResolver- Parameters:
templatePath- path to the template- Returns:
- the template URL, that will be used to load the template
- Throws:
IOException
-