|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.ClassLoader java.security.SecureClassLoader java.net.URLClassLoader org.pentaho.platform.plugin.services.pluginmgr.PluginClassLoader
public class PluginClassLoader
A custom implementation of URLClassLoader
for Pentaho Platform Plugins.
It is used to load plugin jars and classes and aids in retrieving resources by providing
a root directory to search for resources related to plugins.
Note: PluginClassLoader
will search for jar files in a 'lib' subdirectory
under the pluginDir provided in the constructor. Class and other resources will
be visible to this classloader in either the root directory of the plugin or in
the lib folder.
Constructor Summary | |
---|---|
PluginClassLoader(File pluginDir,
ClassLoader parent)
Creates a class loader for loading plugin classes and discovering resources. |
|
PluginClassLoader(File pluginDir,
Object o)
Convenience method that creates a PluginClassLoader with the current
classloader as it's parent. |
|
PluginClassLoader(String pluginDir,
Object parent)
Deprecated. |
Method Summary | |
---|---|
String |
getPluginAbsPath()
Deprecated. |
File |
getPluginDir()
|
boolean |
isPluginClass(Class<?> clazz)
Deprecated. |
List<String> |
listLoadedJars()
Deprecated. |
Class<?> |
loadClass(String name,
boolean resolve)
|
void |
setOverrideLoad(boolean b)
Controls whether or not this classloader will eagerly load a class requested by loadClass(String, boolean) ahead of the parent
classloader. |
String |
toString()
|
Methods inherited from class java.net.URLClassLoader |
---|
findResource, findResources, getURLs, newInstance, newInstance |
Methods inherited from class java.lang.ClassLoader |
---|
clearAssertionStatus, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PluginClassLoader(File pluginDir, ClassLoader parent)
pluginDir
- the root directory of the pluginparent
- the parent classloaderpublic PluginClassLoader(File pluginDir, Object o)
PluginClassLoader
with the current
classloader as it's parent.
pluginDir
- the root directory of the plugino
- the object from which the parent classloader will be derived@Deprecated public PluginClassLoader(String pluginDir, Object parent)
Method Detail |
---|
public void setOverrideLoad(boolean b)
loadClass(String, boolean)
ahead of the parent
classloader. or delegate the load to the parent. If this method
is not called, the default behavior will apply which is to *not*
override classloading.
b
- if true, loadClass method will look to this loader first to load a class,
otherwise, the parent classloader will be queried first.public File getPluginDir()
@Deprecated public String getPluginAbsPath()
@Deprecated public List<String> listLoadedJars()
@Deprecated public boolean isPluginClass(Class<?> clazz)
public Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |