Package com.github.mustachejava.resolver
Class DefaultResolver
- java.lang.Object
-
- com.github.mustachejava.resolver.DefaultResolver
-
- All Implemented Interfaces:
MustacheResolver
public class DefaultResolver extends java.lang.Object implements MustacheResolver
Mustache resolver that provides the default functionality that the default mustache factory relies on by combining the classpath and the filesystem resolver.
-
-
Field Summary
Fields Modifier and Type Field Description private ClasspathResolverclasspathResolverprivate FileSystemResolverfileSystemResolverprivate URIResolveruriResolver
-
Constructor Summary
Constructors Constructor Description DefaultResolver()DefaultResolver(java.io.File fileRoot)Use the file system to resolve mustache templates.DefaultResolver(java.lang.String resourceRoot)Use the classpath to resolve mustache templates.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.ReadergetReader(java.lang.String resourceName)
-
-
-
Field Detail
-
classpathResolver
private final ClasspathResolver classpathResolver
-
fileSystemResolver
private final FileSystemResolver fileSystemResolver
-
uriResolver
private final URIResolver uriResolver
-
-
Constructor Detail
-
DefaultResolver
public DefaultResolver()
-
DefaultResolver
public DefaultResolver(java.lang.String resourceRoot)
Use the classpath to resolve mustache templates.- Parameters:
resourceRoot- where in the classpath to find the templates
-
DefaultResolver
public DefaultResolver(java.io.File fileRoot)
Use the file system to resolve mustache templates.- Parameters:
fileRoot- where in the file system to find the templates
-
-
Method Detail
-
getReader
public java.io.Reader getReader(java.lang.String resourceName)
- Specified by:
getReaderin interfaceMustacheResolver
-
-