edu.ksu.cis.projects.bogor.module
Class DefaultClassLoader

java.lang.Object
  extended by edu.ksu.cis.projects.bogor.module.DefaultClassLoader
All Implemented Interfaces:
IClassLoader, IModule, Disposable

public class DefaultClassLoader
extends Object
implements IClassLoader

Hook for plugin modules to allow clients which do not explicitly depend on the plugin, to still load classes from it. This works around Eclipse's classloader isolation architecture.

This getInstance() method is marked final because each plugin must implement getInstance() sepately in order to force its own classloader to perform the work.

Version:
CVS $Revision: 1.2 $ $Date: 2004/10/29 18:22:16 $
Author:
matt Matt Hoosier

Constructor Summary
DefaultClassLoader()
           
 
Method Summary
 IMessageStore connect(IBogorConfiguration bc)
          Connects this modules to other modules.
 void dispose()
          Remove references.
 String getCopyrightNotice()
          Returns the copyright notice for this module.
 Object getInstance(String className)
           
 IMessageStore setOptions(String key, Properties options)
          Sets the options for this module.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultClassLoader

public DefaultClassLoader()
Method Detail

getInstance

public final Object getInstance(String className)
                         throws ClassNotFoundException,
                                InstantiationException,
                                IllegalAccessException
Specified by:
getInstance in interface IClassLoader
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException

getCopyrightNotice

public String getCopyrightNotice()
Description copied from interface: IModule
Returns the copyright notice for this module.

Specified by:
getCopyrightNotice in interface IModule
Returns:
The copyright notice for this module. Returns null if no additional notice is necessary.

setOptions

public IMessageStore setOptions(String key,
                                Properties options)
Description copied from interface: IModule
Sets the options for this module.

Specified by:
setOptions in interface IModule
Parameters:
key - The key (prefix) for this module options. Must be non-null. The key is used for module specific options.
options - The options for all modules. Must be non-null.

connect

public IMessageStore connect(IBogorConfiguration bc)
Description copied from interface: IModule
Connects this modules to other modules.

Specified by:
connect in interface IModule
Parameters:
bc - The Bogor configuration containing modules to connect to. Must be non-null.

dispose

public void dispose()
Description copied from interface: Disposable
Remove references. Once called, avoid using this object.

Specified by:
dispose in interface Disposable