Class TemplateClassLoader
java.lang.Object
java.lang.ClassLoader
fc.util.pagetemplate.TemplateClassLoader
A classloader that loads templates. Each page is loaded by it's own
separate ClassLoader.
If a page changes on disk (this is tracked by TemplateMgr), then the
new page is loaded by a new instance of this class.
-
Constructor Summary
ConstructorsConstructorDescriptionCallsTemplateClassLoaderwith the logger set to:fc.web.page.TemplateClassLoaderTemplateClassLoader(Log log) -
Method Summary
Methods inherited from class ClassLoader
clearAssertionStatus, getDefinedPackage, getDefinedPackages, getName, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus
-
Constructor Details
-
TemplateClassLoader
- Parameters:
log- logging destination.
-
TemplateClassLoader
public TemplateClassLoader()CallsTemplateClassLoaderwith the logger set to:fc.web.page.TemplateClassLoader
-
-
Method Details
-
loadClass
Loads a class corresponding to a page (i.e., a name that starts withPage.PackageNamefrom. Delegates the loading of all other classes to the parent classloader (typically the system classloader).If the page suffix is
.mp, then a name such asfoo/bar/baz.pageis loaded from the scratch dir (from<scratchdir>/foo/bar/baz.class).- Parameters:
name- a relative page path-name (relative to the page root directory), for examplefoo/bar/my.pageor./my.page- Throws:
ClassNotFoundException
-
main
-