// Path: src/main/java/com/jamierf/dropwizard/debpkg/template/MissingParameterException.java
// public class MissingParameterException extends IllegalArgumentException {
//     public MissingParameterException(final String name) {
//         super("Missing template parameter: " + name);
//     }
// }
// 
// Path: src/main/java/com/jamierf/dropwizard/debpkg/template/Templater.java
// public abstract class Templater {
// 
//     public static Templater getDefault() {
//         return new MustacheTemplater();
//     }
// 
//     public abstract void execute(final Reader input, final Writer output, final String name, final Object parameters);
// 
//     public String execute(final String input, final String name, final Object parameters) throws IOException {
//         if (input == null) {
//             return null;
//         }
// 
//         try (final Reader reader = new StringReader(input)) {
//             final StringWriter writer = new StringWriter();
//             execute(reader, writer, name, parameters);
//             return writer.toString();
//         }
//     }
// }


import com.github.mustachejava.DefaultMustacheFactory;
import com.github.mustachejava.Mustache;
import com.github.mustachejava.MustacheException;
import com.google.common.base.Throwables;
import com.jamierf.dropwizard.debpkg.template.MissingParameterException;
import com.jamierf.dropwizard.debpkg.template.Templater;
import java.io.Reader;
import java.io.Writer;
package com.jamierf.dropwizard.debpkg.template.mustache;



public class MustacheTemplater extends Templater {

    private static final DefaultMustacheFactory MUSTACHE = new DefaultMustacheFactory();

    static {
        MUSTACHE.setObjectHandler(new StrictReflectionObjectHandler());
    }

    @Override
    public void execute(final Reader input, final Writer output, final String name, final Object parameters) {
        try {
            final Mustache template = MUSTACHE.compile(input, name);
            template.execute(output, parameters);
        }
        catch (MustacheException e) {
            final Throwable cause = Throwables.getRootCause(e);
// Path: src/main/java/com/jamierf/dropwizard/debpkg/template/MissingParameterException.java
// public class MissingParameterException extends IllegalArgumentException {
//     public MissingParameterException(final String name) {
//         super("Missing template parameter: " + name);
//     }
// }
// 
// Path: src/main/java/com/jamierf/dropwizard/debpkg/template/Templater.java
// public abstract class Templater {
// 
//     public static Templater getDefault() {
//         return new MustacheTemplater();
//     }
// 
//     public abstract void execute(final Reader input, final Writer output, final String name, final Object parameters);
// 
//     public String execute(final String input, final String name, final Object parameters) throws IOException {
//         if (input == null) {
//             return null;
//         }
// 
//         try (final Reader reader = new StringReader(input)) {
//             final StringWriter writer = new StringWriter();
//             execute(reader, writer, name, parameters);
//             return writer.toString();
//         }
//     }
// }


// Path: src/main/java/com/jamierf/dropwizard/debpkg/template/mustache/MustacheTemplater.java
import com.github.mustachejava.DefaultMustacheFactory;
import com.github.mustachejava.Mustache;
import com.github.mustachejava.MustacheException;
import com.google.common.base.Throwables;
import com.jamierf.dropwizard.debpkg.template.MissingParameterException;
import com.jamierf.dropwizard.debpkg.template.Templater;
import java.io.Reader;
import java.io.Writer;

package com.jamierf.dropwizard.debpkg.template.mustache;



public class MustacheTemplater extends Templater {

    private static final DefaultMustacheFactory MUSTACHE = new DefaultMustacheFactory();

    static {
        MUSTACHE.setObjectHandler(new StrictReflectionObjectHandler());
    }

    @Override
    public void execute(final Reader input, final Writer output, final String name, final Object parameters) {
        try {
            final Mustache template = MUSTACHE.compile(input, name);
            template.execute(output, parameters);
        }
        catch (MustacheException e) {
            final Throwable cause = Throwables.getRootCause(e);
            Throwables.propagateIfInstanceOf(cause, MissingParameterException.class);