Class JMustacheCompiler
- java.lang.Object
-
- com.github.mjeanroy.springmvc.view.mustache.core.AbstractMustacheCompiler
-
- com.github.mjeanroy.springmvc.view.mustache.jmustache.JMustacheCompiler
-
- All Implemented Interfaces:
MustacheCompiler
public final class JMustacheCompiler extends AbstractMustacheCompiler implements MustacheCompiler
Mustache Compiler using JMustache as real implementation.
-
-
Field Summary
-
Fields inherited from class com.github.mjeanroy.springmvc.view.mustache.core.AbstractMustacheCompiler
templateLoader
-
-
Constructor Summary
Constructors Constructor Description JMustacheCompiler(com.samskivert.mustache.Mustache.Compiler compiler, MustacheTemplateLoader templateLoader)
Build new mustache compiler using JMustache API.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MustacheTemplate
doCompile(String name)
Process template compilation.boolean
equals(Object o)
protected com.samskivert.mustache.Template
getTemplate(Reader template, MustacheTemplateLoader templateLoader)
int
hashCode()
String
toString()
-
Methods inherited from class com.github.mjeanroy.springmvc.view.mustache.core.AbstractMustacheCompiler
addTemporaryPartialAliases, compile, getPrefix, getSuffix, removeTemporaryPartialAliases, setPrefix, setSuffix
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.mjeanroy.springmvc.view.mustache.MustacheCompiler
addTemporaryPartialAliases, compile, getPrefix, getSuffix, removeTemporaryPartialAliases, setPrefix, setSuffix
-
-
-
-
Constructor Detail
-
JMustacheCompiler
public JMustacheCompiler(com.samskivert.mustache.Mustache.Compiler compiler, MustacheTemplateLoader templateLoader)
Build new mustache compiler using JMustache API. This compiler need aMustache.Compiler
to produce compiled template and aMustacheTemplateLoader
to load partials defined in templates.- Parameters:
compiler
- JMustache Compiler.templateLoader
- Template Loader.
-
-
Method Detail
-
doCompile
protected MustacheTemplate doCompile(String name)
Description copied from class:AbstractMustacheCompiler
Process template compilation. This methods should rethrows exception since it will be catches later (and a newMustacheCompilationException
will be thrown).- Specified by:
doCompile
in classAbstractMustacheCompiler
- Parameters:
name
- Template name.- Returns:
- Mustache template.
-
getTemplate
protected com.samskivert.mustache.Template getTemplate(Reader template, MustacheTemplateLoader templateLoader)
-
-