@groovy.transform.CompileStatic class TemplateRendererImpl extends java.lang.Object implements TemplateRenderer
API for locating and rendering templates in the code generation layer
Modifiers | Name | Description |
---|---|---|
protected java.util.Map<java.lang.String, Template> |
templateCache |
Type | Name and description |
---|---|
grails.dev.commands.io.FileSystemInteraction |
fileSystemInteraction |
Constructor and description |
---|
TemplateRendererImpl
(java.io.File baseDir, org.springframework.core.io.ResourceLoader resourceLoader) |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
render(java.util.Map<java.lang.String, java.lang.Object> namedArguments) Render with the given named arguments |
|
void |
render(java.lang.CharSequence template, java.io.File destination, Model model) Render the given template to the give destination for the given model |
|
void |
render(java.lang.CharSequence template, java.io.File destination, java.util.Map model, boolean overwrite) Render the given template to the given destination |
|
void |
render(java.io.File template, java.io.File destination, Model model) Render the given template to the give destination for the given model |
|
void |
render(java.io.File template, java.io.File destination, java.util.Map model, boolean overwrite) Render the given template to the given destination |
|
void |
render(org.springframework.core.io.Resource template, java.io.File destination, Model model, boolean overwrite) Render the given template to the give destination for the given model |
|
void |
render(org.springframework.core.io.Resource template, java.io.File destination, java.util.Map model, boolean overwrite) Render the given template to the given destination |
|
org.springframework.core.io.Resource |
template(java.lang.Object location) Find a template at the given location |
|
java.lang.Iterable<Resource> |
templates(java.lang.String pattern) Find templates matching the given pattern |
|
protected static void |
writeTemplateToDestination(groovy.text.Template template, java.util.Map model, java.io.File destination) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Render with the given named arguments
namedArguments
- The named arguments are 'template', 'destination' and 'model'Render the given template to the give destination for the given model
template
- The contents templatedestination
- The destinationmodel
- The modelRender the given template to the given destination
template
- The contents of the templatedestination
- The destinationmodel
- The modelRender the given template to the give destination for the given model
template
- The templatedestination
- The destinationmodel
- The modelRender the given template to the given destination
template
- The templatedestination
- The destinationmodel
- The modelRender the given template to the give destination for the given model
template
- The contents templatedestination
- The destinationmodel
- The modelRender the given template to the given destination
template
- The templatedestination
- The destinationmodel
- The modelFind a template at the given location
location
- The locationFind templates matching the given pattern
pattern
- The patternGroovy Documentation