Package docking.help

Class GHelpClassLoader

java.lang.Object
java.lang.ClassLoader
docking.help.GHelpClassLoader

public class GHelpClassLoader extends ClassLoader
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 Details

    • 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 Details

    • findResource

      protected URL findResource(String name)
      Overridden to allow us to search our modules in addition to the normal class search mechanism.
      Overrides:
      findResource in class 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