Class FallbackMustacheFactory

java.lang.Object
com.github.mustachejava.DefaultMustacheFactory
com.github.mustachejava.FallbackMustacheFactory
All Implemented Interfaces:
MustacheFactory

public class FallbackMustacheFactory extends DefaultMustacheFactory
Mustache.java factory with a fallback mechanism for locating resources. (Some parts are based on DefaultMustacheFactory code that is Copyright 2010 RightTime, Inc.)
  • Field Details

    • resourceRoots

      private Object[] resourceRoots
      List of fallback resource roots to search through.
  • Constructor Details

    • FallbackMustacheFactory

      public FallbackMustacheFactory(String resourceRoot, String fallbackRoot)
      Simple constructor for a fallback Mustache.java factory.
      Parameters:
      resourceRoot - normal resource root
      fallbackRoot - fallback alternative root
    • FallbackMustacheFactory

      public FallbackMustacheFactory(File fileRoot, File fallbackRoot)
      Simple constructor for a fallback Mustache.java factory.
      Parameters:
      fileRoot - normal resource root
      fallbackRoot - fallback alternative root
    • FallbackMustacheFactory

      public FallbackMustacheFactory(Object... resourceRoots)
      Generic constructor for a fallback Mustache.java factory.
      Parameters:
      resourceRoots - array of fallback resource roots as String or File
  • Method Details