io.honeybadger.com.github.mustachejava.DeferringMustacheFactory Maven / Gradle / Ivy
package com.github.mustachejava;
import com.github.mustachejava.codes.PartialCode;
import com.github.mustachejava.util.GuardException;
import com.github.mustachejava.util.InternalArrayList;
import com.github.mustachejava.util.Wrapper;
import java.io.File;
import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.atomic.AtomicLong;
/**
* This allows you to automatically defer evaluation of partials. By default
* it generates HTML but you can override that behavior.
*/
public class DeferringMustacheFactory extends DefaultMustacheFactory {
public static final Object DEFERRED = new Object();
public DeferringMustacheFactory() {
}
public DeferringMustacheFactory(String resourceRoot) {
super(resourceRoot);
}
public DeferringMustacheFactory(File fileRoot) {
super(fileRoot);
}
private static class Deferral {
final long id;
final Future