Class PageClassLoader
java.lang.Object
java.lang.ClassLoader
fc.web.page.PageClassLoader
A classloader that loads molly server pages. Each page is loaded by it's own
separate ClassLoader.
If a page changes on disk (this is tracked by PageMgr), then the
new page is loaded by a new instance of this class. Loaded pages are
casted to the non-reloadable Page interface. This Page interface
itself is loaded by a parent (typically JVM/system) classloader.
-
Constructor Summary
ConstructorsConstructorDescriptionCallsPageClassLoaderwith the logger set to: fc.web.page.PageClassLoaderPageClassLoader(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
-
PageClassLoader
- Parameters:
log- logging destination.scratch- absolute path to the scratch dir
-
PageClassLoader
public PageClassLoader()CallsPageClassLoaderwith the logger set to: fc.web.page.PageClassLoader
-
-
Method Details
-
loadClass
Loads a class corresponding to a page (i.e., a name that starts withfrom. Delegates the loading of all other classes to the parent classloader (typically the system classloader).invalid reference
Page.PackageNameIf the page suffix is .mp, then a name such as foo/bar/baz.page is loaded from the scratch dir (from
/foo/bar/baz.class ).- Parameters:
name- a relative page path-name (relative to the page root directory), for example foo/bar/my.page or ./my.page- Throws:
ClassNotFoundException
-
main
-