Interface MustacheFactory

All Known Implementing Classes:
DefaultMustacheFactory, DeferringMustacheFactory, FallbackMustacheFactory, SafeMustacheFactory, SpecMustacheFactory

public interface MustacheFactory
Factory for creating codes
  • Method Details

    • createMustacheVisitor

      MustacheVisitor createMustacheVisitor()
      Creates the visitor for compilation.
      Returns:
      visitor
    • getReader

      Reader getReader(String resourceName)
      Given a resource name, construct a reader.
      Parameters:
      resourceName - used to find the resource
      Returns:
      a reader
    • encode

      void encode(String value, Writer writer)
      This defines how "encoded" values are encoded. It defaults to something appropriate for HTML output.
      Parameters:
      value - the unencoded value
      writer - where to encode the value
    • getObjectHandler

      ObjectHandler getObjectHandler()
      The object handler knows how to transform names into fields and methods.
      Returns:
      the handler
    • compile

      Mustache compile(String name)
      Create a mustache given a resource name.
      Parameters:
      name - the name of the resource
      Returns:
      the compiled mustache
    • compile

      Mustache compile(Reader reader, String name)
      Create a mustache given a reader and a name.
      Parameters:
      reader - the reader
      name - the name of the resource
      Returns:
      the compiled mustache
    • translate

      String translate(String from)
      Converts your arbitrary name to another name.
      Parameters:
      from - the tag to replace
      Returns:
      the new tag