Package play.templates
Class GroovyTemplateCompiler
- java.lang.Object
-
- play.templates.TemplateCompiler
-
- play.templates.GroovyTemplateCompiler
-
public class GroovyTemplateCompiler extends TemplateCompiler
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class play.templates.TemplateCompiler
TemplateCompiler.Tag
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<java.lang.String>extensionsClassnamesprotected static intmaxPlainTextLength-
Fields inherited from class play.templates.TemplateCompiler
compiledSource, currentLine, doNextScan, parser, skipLineBreak, state, tagIndex, tagsStack, template
-
-
Constructor Summary
Constructors Constructor Description GroovyTemplateCompiler()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaction(boolean absolute)protected java.lang.StringcheckScalaCompatibility(java.lang.String source)Makes the code scala compatible (for the scala module).protected java.lang.StringcheckScalaComptability(java.lang.String source)Deprecated.BaseTemplatecompile(BaseTemplate template)protected voidend()protected voidendTag()protected voidexpr()protected voidhead()protected voidmessage()protected voidplain()Interesting performance observation: Calling print(); from java (in ExecutableTemplate) called from groovy is MUCH slower than java returning string to groovy which then prints with out.print();protected voidscript()protected java.lang.Stringsource()protected voidstartTag()
-
-
-
Field Detail
-
extensionsClassnames
protected java.util.List<java.lang.String> extensionsClassnames
-
maxPlainTextLength
protected static final int maxPlainTextLength
- See Also:
- Constant Field Values
-
-
Method Detail
-
compile
public BaseTemplate compile(BaseTemplate template)
- Overrides:
compilein classTemplateCompiler
-
source
protected java.lang.String source()
- Specified by:
sourcein classTemplateCompiler
-
checkScalaComptability
@Deprecated protected java.lang.String checkScalaComptability(java.lang.String source)
Deprecated.
-
checkScalaCompatibility
protected java.lang.String checkScalaCompatibility(java.lang.String source)
Makes the code scala compatible (for the scala module).- Parameters:
source- The string representation of the code- Returns:
- The scala compatible source
-
head
protected void head()
- Specified by:
headin classTemplateCompiler
-
end
protected void end()
- Specified by:
endin classTemplateCompiler
-
plain
protected void plain()
Interesting performance observation: Calling print(); from java (in ExecutableTemplate) called from groovy is MUCH slower than java returning string to groovy which then prints with out.print();- Specified by:
plainin classTemplateCompiler
-
script
protected void script()
- Specified by:
scriptin classTemplateCompiler
-
expr
protected void expr()
- Specified by:
exprin classTemplateCompiler
-
message
protected void message()
- Specified by:
messagein classTemplateCompiler
-
action
protected void action(boolean absolute)
- Specified by:
actionin classTemplateCompiler
-
startTag
protected void startTag()
- Specified by:
startTagin classTemplateCompiler
-
endTag
protected void endTag()
- Specified by:
endTagin classTemplateCompiler
-
-