Class ClasspathResolver

  • All Implemented Interfaces:
    MustacheResolver

    public class ClasspathResolver
    extends java.lang.Object
    implements MustacheResolver
    MustacheResolver implementation that resolves mustache files from the classpath.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String resourceRoot  
    • Constructor Summary

      Constructors 
      Constructor Description
      ClasspathResolver()  
      ClasspathResolver​(java.lang.String resourceRoot)
      Use the classpath to resolve mustache templates.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.lang.String concatResourceRootAndResourceName​(java.lang.String resourceName)  
      java.io.Reader getReader​(java.lang.String resourceName)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • resourceRoot

        private final java.lang.String resourceRoot
    • Constructor Detail

      • ClasspathResolver

        public ClasspathResolver()
      • ClasspathResolver

        public ClasspathResolver​(java.lang.String resourceRoot)
        Use the classpath to resolve mustache templates.
        Parameters:
        resourceRoot - where to find the templates
    • Method Detail

      • getReader

        public java.io.Reader getReader​(java.lang.String resourceName)
        Specified by:
        getReader in interface MustacheResolver
      • concatResourceRootAndResourceName

        private java.lang.String concatResourceRootAndResourceName​(java.lang.String resourceName)