|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.samskivert.mustache.Mustache.Compiler
public static class Mustache.Compiler
An interface to the Mustache compilation process. See Mustache.
| Field Summary | |
|---|---|
boolean |
escapeHTML
Whether or not HTML entities are escaped by default. |
Mustache.TemplateLoader |
loader
The template loader in use during this compilation. |
boolean |
missingIsNull
If this value is true, missing variables will be treated like variables that return null. |
java.lang.String |
nullValue
A value to use when a variable resolves to null. |
boolean |
standardsMode
Whether or not standards mode is enabled. |
| Method Summary | |
|---|---|
Template |
compile(java.io.Reader source)
Compiles the supplied template into a repeatedly executable intermediate form. |
Template |
compile(java.lang.String template)
Compiles the supplied template into a repeatedly executable intermediate form. |
Mustache.Compiler |
defaultValue(java.lang.String defaultValue)
Returns a compiler that will use the given value for any variable that is missing, or otherwise resolves to null. |
Mustache.Compiler |
escapeHTML(boolean escapeHTML)
Returns a compiler that either does or does not escape HTML by default. |
Mustache.Compiler |
nullValue(java.lang.String nullValue)
Returns a compiler that will use the given value for any variable that resolves to null, but will still raise an exception for variables for which an accessor cannot be found. |
Mustache.Compiler |
standardsMode(boolean standardsMode)
Returns a compiler that either does or does not use standards mode. |
Mustache.Compiler |
withLoader(Mustache.TemplateLoader loader)
Returns a compiler configured to use the supplied template loader to handle partials. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final boolean escapeHTML
public final boolean standardsMode
public final java.lang.String nullValue
missingIsNull is also
true, this value will be used when a variable cannot be resolved.
public final boolean missingIsNull
nullValue will be used in their place, assuming nullValue is
configured to a non-null value.
public final Mustache.TemplateLoader loader
| Method Detail |
|---|
public Template compile(java.lang.String template)
public Template compile(java.io.Reader source)
public Mustache.Compiler escapeHTML(boolean escapeHTML)
public Mustache.Compiler standardsMode(boolean standardsMode)
public Mustache.Compiler defaultValue(java.lang.String defaultValue)
nullValue except that it returns the
supplied default for missing keys and existing keys that return null values. Note that
regardless of whether a null or default value is configured, if the resolution of part
of a compound key results in a missing or null value, an exception will be raised.
public Mustache.Compiler nullValue(java.lang.String nullValue)
defaultValue(java.lang.String) except that it differentiates between missing
accessors, and accessors that exist but return null.
Map being used as a context, all possible accessors are
assumed to exist (but potentially return null), and no exception will ever be
raised.
public Mustache.Compiler withLoader(Mustache.TemplateLoader loader)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||