From c67f6aeac55d0ccc24080dd6ff152b966a48443d Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 13 Oct 2011 20:39:39 -0700 Subject: [PATCH] Oh yeah, we need a way to plug in a custom collector. --- src/main/java/com/samskivert/mustache/Mustache.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/samskivert/mustache/Mustache.java b/src/main/java/com/samskivert/mustache/Mustache.java index a9467ff..2e239e1 100644 --- a/src/main/java/com/samskivert/mustache/Mustache.java +++ b/src/main/java/com/samskivert/mustache/Mustache.java @@ -118,6 +118,12 @@ public class Mustache this.missingIsNull, loader, this.collector); } + /** Returns a compiler configured to use the supplied collector. */ + public Compiler withCollector (Collector collector) { + return new Compiler(this.escapeHTML, this.standardsMode, this.nullValue, + this.missingIsNull, this.loader, collector); + } + protected Compiler (boolean escapeHTML, boolean standardsMode, String nullValue, boolean missingIsNull, TemplateLoader loader, Collector collector) { this.escapeHTML = escapeHTML;