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>
extensionsClassnames
protected static int
maxPlainTextLength
-
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 void
action(boolean absolute)
protected java.lang.String
checkScalaCompatibility(java.lang.String source)
Makes the code scala compatible (for the scala module).protected java.lang.String
checkScalaComptability(java.lang.String source)
Deprecated.BaseTemplate
compile(BaseTemplate template)
protected void
end()
protected void
endTag()
protected void
expr()
protected void
head()
protected void
message()
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();protected void
script()
protected java.lang.String
source()
protected void
startTag()
-
-
-
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:
compile
in classTemplateCompiler
-
source
protected java.lang.String source()
- Specified by:
source
in 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:
head
in classTemplateCompiler
-
end
protected void end()
- Specified by:
end
in 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:
plain
in classTemplateCompiler
-
script
protected void script()
- Specified by:
script
in classTemplateCompiler
-
expr
protected void expr()
- Specified by:
expr
in classTemplateCompiler
-
message
protected void message()
- Specified by:
message
in classTemplateCompiler
-
action
protected void action(boolean absolute)
- Specified by:
action
in classTemplateCompiler
-
startTag
protected void startTag()
- Specified by:
startTag
in classTemplateCompiler
-
endTag
protected void endTag()
- Specified by:
endTag
in classTemplateCompiler
-
-