Package com.github.mustachejava
Interface MustacheFactory
- All Known Implementing Classes:
DefaultMustacheFactory,DeferringMustacheFactory,FallbackMustacheFactory,SafeMustacheFactory,SpecMustacheFactory
public interface MustacheFactory
Factory for creating codes
-
Method Summary
Modifier and TypeMethodDescriptionCreate a mustache given a reader and a name.Create a mustache given a resource name.Creates the visitor for compilation.voidThis defines how "encoded" values are encoded.The object handler knows how to transform names into fields and methods.Given a resource name, construct a reader.Converts your arbitrary name to another name.
-
Method Details
-
createMustacheVisitor
MustacheVisitor createMustacheVisitor()Creates the visitor for compilation.- Returns:
- visitor
-
getReader
Given a resource name, construct a reader.- Parameters:
resourceName- used to find the resource- Returns:
- a reader
-
encode
This defines how "encoded" values are encoded. It defaults to something appropriate for HTML output.- Parameters:
value- the unencoded valuewriter- where to encode the value
-
getObjectHandler
ObjectHandler getObjectHandler()The object handler knows how to transform names into fields and methods.- Returns:
- the handler
-
compile
Create a mustache given a resource name.- Parameters:
name- the name of the resource- Returns:
- the compiled mustache
-
compile
Create a mustache given a reader and a name.- Parameters:
reader- the readername- the name of the resource- Returns:
- the compiled mustache
-
translate
Converts your arbitrary name to another name.- Parameters:
from- the tag to replace- Returns:
- the new tag
-