Formatting, and small javadoc improvement.
This commit is contained in:
@@ -40,20 +40,22 @@ public class Template
|
||||
* the variable context that was in effect at the time the lambda was called.
|
||||
*/
|
||||
public abstract class Fragment {
|
||||
/** Executes this template fragment, writing its result to {@code out}. */
|
||||
/** Executes this fragment; writes its result to {@code out}. */
|
||||
public abstract void execute (Writer out);
|
||||
|
||||
/** Executes this template fragment with the provided context, writing its result to {@code out}. */
|
||||
/** Executes this fragment with the provided context; writes its result to {@code out}. The
|
||||
* provided context will be nested in the fragment's bound context. */
|
||||
public abstract void execute (Object context, Writer out);
|
||||
|
||||
/** Executes this template fragment and returns its result as a string. */
|
||||
/** Executes this fragment and returns its result as a string. */
|
||||
public String execute () {
|
||||
StringWriter out = new StringWriter();
|
||||
execute(out);
|
||||
return out.toString();
|
||||
}
|
||||
|
||||
/** Executes this template fragment with the provided context, and returns its result as a string. */
|
||||
/** Executes this fragment with the provided context; returns its result as a string. The
|
||||
* provided context will be nested in the fragment's bound context. */
|
||||
public String execute (Object context) {
|
||||
StringWriter out = new StringWriter();
|
||||
execute(context, out);
|
||||
|
||||
@@ -674,8 +674,7 @@ public class MustacheTest
|
||||
public void execute (Template.Fragment frag, Writer out) throws IOException {
|
||||
frag.execute(context("a", "a in l2"), out);
|
||||
}
|
||||
}
|
||||
));
|
||||
}));
|
||||
}
|
||||
|
||||
@Test public void testNonStandardDefaultDelims () {
|
||||
|
||||
Reference in New Issue
Block a user