groovy.text
Class SimpleTemplateEngine.SimpleTemplate
java.lang.Object
groovy.text.SimpleTemplateEngine.SimpleTemplate
- All Implemented Interfaces:
- Template
- Enclosing class:
- SimpleTemplateEngine
- private static class SimpleTemplateEngine.SimpleTemplate
- extends java.lang.Object
- implements Template
Method Summary |
private void |
endScript(java.io.StringWriter sw)
|
private void |
groovyExpression(java.io.Reader reader,
java.io.StringWriter sw)
Closes the currently open write and writes out the following text as a GString expression until it reaches an end %>. |
private void |
groovySection(java.io.Reader reader,
java.io.StringWriter sw)
Closes the currently open write and writes the following text as normal Groovy script code until it reaches an end %>. |
Writable |
make()
|
Writable |
make(java.util.Map map)
|
private java.lang.String |
parse(java.io.Reader reader)
Parse the text document looking for <% or <%= and then call out to the appropriate handler, otherwise copy the text directly
into the script while escaping quotes. |
private void |
startScript(java.io.StringWriter sw)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
script
private Script script
SimpleTemplateEngine.SimpleTemplate
private SimpleTemplateEngine.SimpleTemplate()
make
public Writable make()
- Specified by:
make
in interface Template
make
public Writable make(java.util.Map map)
- Specified by:
make
in interface Template
parse
private java.lang.String parse(java.io.Reader reader)
throws java.io.IOException
- Parse the text document looking for <% or <%= and then call out to the appropriate handler, otherwise copy the text directly
into the script while escaping quotes.
- Parameters:
reader
-
- Returns:
-
- Throws:
java.io.IOException
startScript
private void startScript(java.io.StringWriter sw)
endScript
private void endScript(java.io.StringWriter sw)
groovyExpression
private void groovyExpression(java.io.Reader reader,
java.io.StringWriter sw)
throws java.io.IOException
- Closes the currently open write and writes out the following text as a GString expression until it reaches an end %>.
- Parameters:
reader
- sw
-
- Throws:
java.io.IOException
groovySection
private void groovySection(java.io.Reader reader,
java.io.StringWriter sw)
throws java.io.IOException
- Closes the currently open write and writes the following text as normal Groovy script code until it reaches an end %>.
- Parameters:
reader
- sw
-
- Throws:
java.io.IOException
Copyright © 2003-2005 The Codehaus. All Rights Reserved.