groovy.text
Class GStringTemplateEngine.GStringTemplate
java.lang.Object
groovy.text.GStringTemplateEngine.GStringTemplate
- All Implemented Interfaces:
- Template
class GStringTemplateEngine.GStringTemplate
Constructor Summary |
GStringTemplateEngine.GStringTemplate(Reader reader, ClassLoader parentLoader)
Turn the template into a writable Closure
When executed the closure evaluates all the code embedded in the
template and then writes a GString containing the fixed and variable items
to the writer passed as a parameter
For example:
'<%= "test" %> of expr and <% test = 1 %>${test} script.'
|
Methods inherited from class Object
|
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll |
template
final Closure template
-
GStringTemplateEngine.GStringTemplate
public GStringTemplateEngine.GStringTemplate(Reader reader, ClassLoader parentLoader)
- Turn the template into a writable Closure
When executed the closure evaluates all the code embedded in the
template and then writes a GString containing the fixed and variable items
to the writer passed as a parameter
For example:
'<%= "test" %> of expr and <% test = 1 %>${test} script.'
would compile into:
{ out -> out << "${"test"} of expr and "; test = 1 ; out << "${test} script."}.asWritable()
- param:
- reader
- param:
- parentLoader
- throws:
- CompilationFailedException
- throws:
- ClassNotFoundException
- throws:
- IOException
make
public Writable make()
-
make
public Writable make(Map map)
-
Copyright © 2003-2009 The Codehaus. All rights reserved.