package spark.template.jade.loader;

import de.neuland.jade4j.template.ClasspathTemplateLoader;
import de.neuland.jade4j.template.TemplateLoader;

import java.io.IOException;
import java.io.Reader;

public class SparkClasspathLoader extends ClasspathTemplateLoader {

    private String templateRoot;

    public SparkClasspathLoader(String templateRoot) {
        this.templateRoot = templateRoot;
    }

    @Override
    public Reader getReader(String name) throws IOException {
        return super.getReader(templateRoot + name);
    }
}

@@ -1,8 +1,596 @@
+/**%0A * Copyright (c) 2015%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A
 package 
@@ -680,58 +680,8 @@
 der;
-%0Aimport de.neuland.jade4j.template.TemplateLoader;
 %0A%0Aim
@@ -730,16 +730,83 @@
 eader;%0A%0A
+/**%0A * Load templates from a given directory on the classpath.%0A */%0A
 public c
@@ -900,16 +900,161 @@
 eRoot;%0A%0A
+    /**%0A     * Construct a classpath loader using the given template root.%0A     *%0A     * @param templateRoot the template root directory%0A     */%0A
     publ
@@ -1149,16 +1149,53 @@
 %0A    %7D%0A%0A
+    /**%0A     * %7B@inheritDoc%7D%0A     */%0A
     @Ove

Rework the SparkClasspathLoader