Package com.github.mustachejava
Interface MustacheFactory
-
- All Known Implementing Classes:
DefaultMustacheFactory,DeferringMustacheFactory,FallbackMustacheFactory,SafeMustacheFactory,SpecMustacheFactory
public interface MustacheFactoryFactory for creating codes
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Mustachecompile(java.io.Reader reader, java.lang.String name)Create a mustache given a reader and a name.Mustachecompile(java.lang.String name)Create a mustache given a resource name.MustacheVisitorcreateMustacheVisitor()Creates the visitor for compilation.voidencode(java.lang.String value, java.io.Writer writer)This defines how "encoded" values are encoded.ObjectHandlergetObjectHandler()The object handler knows how to transform names into fields and methods.java.io.ReadergetReader(java.lang.String resourceName)Given a resource name, construct a reader.java.lang.Stringtranslate(java.lang.String from)Converts your arbitrary name to another name.
-
-
-
Method Detail
-
createMustacheVisitor
MustacheVisitor createMustacheVisitor()
Creates the visitor for compilation.- Returns:
- visitor
-
getReader
java.io.Reader getReader(java.lang.String resourceName)
Given a resource name, construct a reader.- Parameters:
resourceName- used to find the resource- Returns:
- a reader
-
encode
void encode(java.lang.String value, java.io.Writer writer)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
Mustache compile(java.lang.String name)
Create a mustache given a resource name.- Parameters:
name- the name of the resource- Returns:
- the compiled mustache
-
compile
Mustache compile(java.io.Reader reader, java.lang.String name)
Create a mustache given a reader and a name.- Parameters:
reader- the readername- the name of the resource- Returns:
- the compiled mustache
-
translate
java.lang.String translate(java.lang.String from)
Converts your arbitrary name to another name.- Parameters:
from- the tag to replace- Returns:
- the new tag
-
-