Class MustacheJavaCompiler
- java.lang.Object
-
- com.github.mjeanroy.springmvc.view.mustache.core.AbstractMustacheCompiler
-
- com.github.mjeanroy.springmvc.view.mustache.mustachejava.MustacheJavaCompiler
-
- All Implemented Interfaces:
MustacheCompiler
public final class MustacheJavaCompiler extends AbstractMustacheCompiler implements MustacheCompiler
Mustache compiler. This compiler use internally mustache.java as real implementation.
-
-
Field Summary
-
Fields inherited from class com.github.mjeanroy.springmvc.view.mustache.core.AbstractMustacheCompiler
templateLoader
-
-
Constructor Summary
Constructors Constructor Description MustacheJavaCompiler(com.github.mustachejava.MustacheFactory mustacheFactory, MustacheTemplateLoader templateLoader)
Build new compiler based on mustache.java.
-
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)
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
-
MustacheJavaCompiler
public MustacheJavaCompiler(com.github.mustachejava.MustacheFactory mustacheFactory, MustacheTemplateLoader templateLoader)
Build new compiler based on mustache.java. An instance ofSpringMustacheFactory
that used template loader is automatically created.- Parameters:
mustacheFactory
- The Mustache Factory implementation.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.
-
-