Package docking.help
Class GHelpClassLoader
java.lang.Object
java.lang.ClassLoader
docking.help.GHelpClassLoader
A
ClassLoader
for loading help data. This is only need when running in Eclipse. We
do not include help data in the source tree for any module, in order to save build time. By
doing this, we need a way to allow the Java Help system to find this data. We have
Overridden findResource(String)
to look in our module directories for their
respective help.
This class is not needed in an installation since the help is bundled into jar files that live in the classpath and thus the default class loader will find them.
-
Constructor Summary
ConstructorDescriptionGHelpClassLoader
(ResourceFile moduleDirectory) Constructs this class loader with the given module, which may be null. -
Method Summary
Modifier and TypeMethodDescriptionprotected URL
findResource
(String name) Overridden to allow us to search our modules in addition to the normal class search mechanism.Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Constructor Details
-
GHelpClassLoader
Constructs this class loader with the given module, which may be null. When the module is null, this class will only looks for items on the classpath, under a 'help' directory.- Parameters:
moduleDirectory
- the module directory to search; may be null
-
-
Method Details
-
findResource
Overridden to allow us to search our modules in addition to the normal class search mechanism.- Overrides:
findResource
in classClassLoader
- Parameters:
name
- the name of the help item to load- Returns:
- the URL for the given item; null if the item cannot be found
-