Brace fiddling.

This commit is contained in:
Michael Bayne
2017-12-17 14:46:42 -08:00
parent af623f1335
commit 326f04cb1e
2 changed files with 28 additions and 26 deletions
@@ -16,6 +16,7 @@ import java.util.Map;
* output. The context can be any tree of objects. Variables are resolved against the context.
* Given a name {@code foo}, the following mechanisms are supported for resolving its value
* (and are sought in this order):
*
* <ul>
* <li>If the variable has the special name {@code this} the context object itself will be
* returned. This is useful when iterating over lists.
@@ -25,6 +26,7 @@ import java.util.Map;
* <li>A method named {@code getFoo} in the supplied object (with non-void return value).
* <li>A field named {@code foo} in the supplied object.
* </ul>
*
* <p> The field type, method return type, or map value type should correspond to the desired
* behavior if the resolved name corresponds to a section. {@link Boolean} is used for showing or
* hiding sections without binding a sub-context. Arrays, {@link Iterator} and {@link Iterable}
@@ -33,13 +35,14 @@ import java.util.Map;
* to add if desire exists. See the <a href="http://mustache.github.com/mustache.5.html">Mustache
* documentation</a> for more details on section behavior. </p>
*/
public class Template
{
public class Template {
/**
* Encapsulates a fragment of a template that is passed to a lambda. The fragment is bound to
* the variable context that was in effect at the time the lambda was called.
*/
public abstract class Fragment {
/** Executes this fragment; writes its result to {@code out}. */
public abstract void execute (Writer out);