Class MontiCoreTemplateLoader
java.lang.Object
freemarker.cache.URLTemplateLoader
de.monticore.generating.templateengine.freemarker.MontiCoreTemplateLoader
- All Implemented Interfaces:
freemarker.cache.TemplateLoader
public class MontiCoreTemplateLoader
extends freemarker.cache.URLTemplateLoader
Is used to load templates with a given
ClassLoader.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMontiCoreTemplateLoader(ClassLoader classLoader) Creates a newMontiCoreTemplateLoaderthat uses the given class loader to load FreeMarker templates from the class path -
Method Summary
Methods inherited from class freemarker.cache.URLTemplateLoader
canonicalizePrefix, closeTemplateSource, findTemplateSource, getLastModified, getReader, getURLConnectionUsesCaches, setURLConnectionUsesCaches
-
Field Details
-
classLoader
the used class loader
-
-
Constructor Details
-
MontiCoreTemplateLoader
Creates a newMontiCoreTemplateLoaderthat uses the given class loader to load FreeMarker templates from the class path- Parameters:
classLoader-
-
-
Method Details
-
getURL
Resolves the location of a template on the local machine.- Specified by:
getURLin classfreemarker.cache.URLTemplateLoader- Parameters:
templateName- The qualified name of the Template. Example: "cd2data.core.Attribute" or "cd2data/core/Attribute" or "cd2data.core.Attribute.ftl"- Returns:
- URL of the template on the local machine. Example: "jar:file:/C:/.../dex/gtr/target/dex-gtr-0.9.4-SNAPSHOT.jar!/cd2data/core/Attribute.ftl" (this is from the toString method of the URL object)
- See Also:
-