Package com.github.mustachejava
Class SpecMustacheFactory
java.lang.Object
com.github.mustachejava.DefaultMustacheFactory
com.github.mustachejava.SpecMustacheFactory
- All Implemented Interfaces:
MustacheFactory
This factory is similar to DefaultMustacheFactory but handles whitespace according to the mustache specification.
Therefore the rendering is less performant than with the DefaultMustacheFactory.
-
Field Summary
Fields inherited from class com.github.mustachejava.DefaultMustacheFactory
es, mc, mustacheCache, oh, recursionLimit, templateCache -
Constructor Summary
ConstructorsConstructorDescriptionSpecMustacheFactory(MustacheResolver mustacheResolver) SpecMustacheFactory(File fileRoot) Use the file system to resolve mustache templates.SpecMustacheFactory(String classpathResourceRoot) Use the classpath to resolve mustache templates. -
Method Summary
Methods inherited from class com.github.mustachejava.DefaultMustacheFactory
compile, compile, compile, compilePartial, createLambdaCache, createMustacheCache, encode, filterText, getExecutorService, getFragment, getFragmentCacheFunction, getMustacheCacheFunction, getObjectHandler, getReader, getRecursionLimit, resolvePartialPath, setExecutorService, setObjectHandler, setRecursionLimit, translate
-
Constructor Details
-
SpecMustacheFactory
public SpecMustacheFactory() -
SpecMustacheFactory
-
SpecMustacheFactory
Use the classpath to resolve mustache templates.- Parameters:
classpathResourceRoot- the location in the resources where templates are stored
-
SpecMustacheFactory
Use the file system to resolve mustache templates.- Parameters:
fileRoot- the root of the file system where templates are stored
-
-
Method Details
-
createMustacheVisitor
Description copied from interface:MustacheFactoryCreates the visitor for compilation.- Specified by:
createMustacheVisitorin interfaceMustacheFactory- Overrides:
createMustacheVisitorin classDefaultMustacheFactory- Returns:
- visitor
-
createParser
- Overrides:
createParserin classDefaultMustacheFactory
-