001package org.unix4j.codegen.loader;
002
003import java.net.URL;
004
005import freemarker.template.TemplateModel;
006
007/**
008 * Loads and returns a {@link TemplateModel} based on a resource such as an XML
009 * file.
010 */
011public interface ResourceBasedDataLoader {
012        /**
013         * Loads and returns a {@link TemplateModel} based on the specified
014         * {@code resource}.
015         * 
016         * @param resource
017         *            the resource reference, never null
018         * @return the template model constructed on the basis of the specified
019         *         {@code resource}
020         */
021        TemplateModel load(URL resource);
022
023}