Package com.github.mustachejava
Class SpecMustacheFactory
- java.lang.Object
-
- com.github.mustachejava.DefaultMustacheFactory
-
- com.github.mustachejava.SpecMustacheFactory
-
- All Implemented Interfaces:
MustacheFactory
public class SpecMustacheFactory extends DefaultMustacheFactory
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
Constructors Constructor Description SpecMustacheFactory()SpecMustacheFactory(MustacheResolver mustacheResolver)SpecMustacheFactory(java.io.File fileRoot)Use the file system to resolve mustache templates.SpecMustacheFactory(java.lang.String classpathResourceRoot)Use the classpath to resolve mustache templates.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MustacheVisitorcreateMustacheVisitor()Creates the visitor for compilation.protected MustacheParsercreateParser()-
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 Detail
-
SpecMustacheFactory
public SpecMustacheFactory()
-
SpecMustacheFactory
public SpecMustacheFactory(MustacheResolver mustacheResolver)
-
SpecMustacheFactory
public SpecMustacheFactory(java.lang.String classpathResourceRoot)
Use the classpath to resolve mustache templates.- Parameters:
classpathResourceRoot- the location in the resources where templates are stored
-
SpecMustacheFactory
public SpecMustacheFactory(java.io.File fileRoot)
Use the file system to resolve mustache templates.- Parameters:
fileRoot- the root of the file system where templates are stored
-
-
Method Detail
-
createMustacheVisitor
public MustacheVisitor createMustacheVisitor()
Description copied from interface:MustacheFactoryCreates the visitor for compilation.- Specified by:
createMustacheVisitorin interfaceMustacheFactory- Overrides:
createMustacheVisitorin classDefaultMustacheFactory- Returns:
- visitor
-
createParser
protected MustacheParser createParser()
- Overrides:
createParserin classDefaultMustacheFactory
-
-