public class GroovyTemplateResolver extends Object implements groovy.text.markup.TemplateResolver
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,URL> |
cache |
protected String |
pathPrefix |
protected boolean |
useCache |
| Constructor and Description |
|---|
GroovyTemplateResolver(String pathPrefix)
Creates a new caching template resolver using a concurrent hash map as
the backing cache.
|
GroovyTemplateResolver(String pathPrefix,
Map<String,URL> cache)
Creates a new caching template resolver.
|
| Modifier and Type | Method and Description |
|---|---|
void |
configure(ClassLoader templateClassLoader,
groovy.text.markup.TemplateConfiguration configuration) |
protected URL |
getResource(String templatePath) |
URL |
resolveTemplate(String templatePath) |
protected final String pathPrefix
protected boolean useCache
public GroovyTemplateResolver(String pathPrefix, Map<String,URL> cache)
cache - the backing cachepublic GroovyTemplateResolver(String pathPrefix)
public void configure(ClassLoader templateClassLoader, groovy.text.markup.TemplateConfiguration configuration)
configure in interface groovy.text.markup.TemplateResolverpublic URL resolveTemplate(String templatePath) throws IOException
resolveTemplate in interface groovy.text.markup.TemplateResolverIOExceptionCopyright © 2018. All Rights Reserved.