Package docking.help
Class GHelpClassLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- docking.help.GHelpClassLoader
-
public class GHelpClassLoader extends java.lang.ClassLoader
AClassLoader
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 OverriddenfindResource(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
Constructors Constructor Description GHelpClassLoader(ResourceFile moduleDirectory)
Constructs this class loader with the given module, which may be null.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.net.URL
findResource(java.lang.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 Detail
-
GHelpClassLoader
public GHelpClassLoader(ResourceFile moduleDirectory)
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 Detail
-
findResource
protected java.net.URL findResource(java.lang.String name)
Overridden to allow us to search our modules in addition to the normal class search mechanism.- Overrides:
findResource
in classjava.lang.ClassLoader
- Parameters:
name
- the name of the help item to load- Returns:
- the URL for the given item; null if the item cannot be found
-
-