public class TemplateClassLoader extends 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 and Description |
---|
TemplateClassLoader()
Calls
TemplateClassLoader with the logger set to:
fc.web.page.TemplateClassLoader |
TemplateClassLoader(Log log) |
Modifier and Type | Method and Description |
---|---|
Class |
loadClass(String name,
boolean resolve)
Loads a class corresponding to a page (i.e., a name that starts
with
Page.PackageName from. |
static void |
main(String[] args) |
clearAssertionStatus, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus
public TemplateClassLoader(Log log)
scratch
- absolute path to the scratch dirlog
- logging destination.public TemplateClassLoader()
TemplateClassLoader
with the logger set to:
fc.web.page.TemplateClassLoaderpublic Class loadClass(String name, boolean resolve) throws ClassNotFoundException
Page.PackageName
from. 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 as
foo/bar/baz.page is loaded from the scratch dir (from
loadClass
in class ClassLoader
name
- a relative page path-name (relative to the page
root directory), for example foo/bar/my.page
or ./my.pageClassNotFoundException