org.kuali.rice.kew.plugin
Class PluginClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by org.kuali.rice.kew.plugin.PluginClassLoader
All Implemented Interfaces:
Lifecycle

public class PluginClassLoader
extends URLClassLoader
implements Lifecycle

A simple class loader implementation which looks at itself before delegating to its parent.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
PluginClassLoader()
           
PluginClassLoader(ClassLoader parent)
           
PluginClassLoader(ClassLoader parent, File sharedDirectory, File pluginDirectory)
           
 
Method Summary
 void addClassesDirectory(File classesDir)
           
 void addLibDirectory(File libDir)
           
 void addURL(URL url)
           
 PluginConfig getConfig()
           
 URL getResource(String name)
           
 Enumeration<URL> getResources(String name)
           
 boolean isStarted()
           
 Class loadClass(String className)
           
 Class loadClass(String name, boolean resolve)
           
 void setConfig(PluginConfig config)
           
 void start()
           
 void stop()
           
 String toString()
           
 
Methods inherited from class java.net.URLClassLoader
definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResourceAsStream, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PluginClassLoader

public PluginClassLoader()

PluginClassLoader

public PluginClassLoader(ClassLoader parent)

PluginClassLoader

public PluginClassLoader(ClassLoader parent,
                         File sharedDirectory,
                         File pluginDirectory)
                  throws MalformedURLException
Throws:
MalformedURLException
Method Detail

addClassesDirectory

public void addClassesDirectory(File classesDir)
                         throws MalformedURLException
Throws:
MalformedURLException

addLibDirectory

public void addLibDirectory(File libDir)
                     throws MalformedURLException
Throws:
MalformedURLException

loadClass

public Class loadClass(String className)
                throws ClassNotFoundException
Overrides:
loadClass in class ClassLoader
Throws:
ClassNotFoundException

addURL

public void addURL(URL url)
Overrides:
addURL in class URLClassLoader

loadClass

public Class loadClass(String name,
                       boolean resolve)
                throws ClassNotFoundException
Overrides:
loadClass in class ClassLoader
Throws:
ClassNotFoundException

getResource

public URL getResource(String name)
Overrides:
getResource in class ClassLoader

getResources

public Enumeration<URL> getResources(String name)
                              throws IOException
Overrides:
getResources in class ClassLoader
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object

getConfig

public PluginConfig getConfig()

setConfig

public void setConfig(PluginConfig config)

start

public void start()
Specified by:
start in interface Lifecycle

stop

public void stop()
Specified by:
stop in interface Lifecycle

isStarted

public boolean isStarted()
Specified by:
isStarted in interface Lifecycle


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.