Package play.templates
Class GroovyTemplate
- java.lang.Object
-
- play.templates.Template
-
- play.templates.BaseTemplate
-
- play.templates.GroovyTemplate
-
public class GroovyTemplate extends BaseTemplate
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGroovyTemplate.ExecutableTemplateGroovy templatestatic classGroovyTemplate.TClassLoader-
Nested classes/interfaces inherited from class play.templates.BaseTemplate
BaseTemplate.RawData
-
-
Field Summary
-
Fields inherited from class play.templates.BaseTemplate
compiledSource, compiledTemplate, compiledTemplateName, currentTemplate, doBodyLines, layout, layoutData, linesMatrix, timestamp
-
-
Constructor Summary
Constructors Constructor Description GroovyTemplate(java.lang.String source)GroovyTemplate(java.lang.String name, java.lang.String source)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ThrowablecleanStackTrace(java.lang.Throwable e)voidcompile()protected java.lang.StringinternalRender(java.util.Map<java.lang.String,java.lang.Object> args)The internal rendering method - When one template calls another template, this method is used.protected static booleanisSimpleParam(java.lang.Class type)protected voidonCompileEnd()static <T> voidregisterFormatter(java.lang.String format, SafeFormatter formatter)java.lang.Stringrender(java.util.Map<java.lang.String,java.lang.Object> args)Starts the rendering process without modifying the args-mapprotected groovy.lang.BindingsetUpBindingVariables(java.util.Map<java.lang.String,java.lang.Object> args)protected org.codehaus.groovy.control.CompilerConfigurationsetUpCompilerConfiguration()-
Methods inherited from class play.templates.BaseTemplate
loadFromCache, loadPrecompiled
-
-
-
-
Method Detail
-
registerFormatter
public static <T> void registerFormatter(java.lang.String format, SafeFormatter formatter)
-
setUpCompilerConfiguration
protected org.codehaus.groovy.control.CompilerConfiguration setUpCompilerConfiguration()
-
onCompileEnd
protected void onCompileEnd()
-
render
public java.lang.String render(java.util.Map<java.lang.String,java.lang.Object> args)
Description copied from class:TemplateStarts the rendering process without modifying the args-map
-
setUpBindingVariables
protected groovy.lang.Binding setUpBindingVariables(java.util.Map<java.lang.String,java.lang.Object> args)
-
internalRender
protected java.lang.String internalRender(java.util.Map<java.lang.String,java.lang.Object> args)
Description copied from class:TemplateThe internal rendering method - When one template calls another template, this method is used. The input args-map is constantly being modified, as different templates "communicate" with each other by storing info in the map- Specified by:
internalRenderin classTemplate- Parameters:
args- List of arguments use in render- Returns:
- The template result as string
-
cleanStackTrace
protected java.lang.Throwable cleanStackTrace(java.lang.Throwable e)
- Specified by:
cleanStackTracein classBaseTemplate
-
isSimpleParam
protected static boolean isSimpleParam(java.lang.Class type)
-
-