com.atlassian.plugin.classloader
Class PluginClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by com.atlassian.plugin.classloader.PluginClassLoader

public class PluginClassLoader
extends java.net.URLClassLoader

A class loader used to load classes and resources from a given plugin.


Constructor Summary
PluginClassLoader(java.io.File pluginFile)
           
PluginClassLoader(java.io.File pluginFile, java.lang.ClassLoader parent)
           
 
Method Summary
 void close()
           
 java.net.URL getResource(java.lang.String name)
          Load the named resource from this plugin.
 
Methods inherited from class java.net.URLClassLoader
addURL, 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, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginClassLoader

public PluginClassLoader(java.io.File pluginFile)

PluginClassLoader

public PluginClassLoader(java.io.File pluginFile,
                         java.lang.ClassLoader parent)
Method Detail

getResource

public java.net.URL getResource(java.lang.String name)
Load the named resource from this plugin. This implementation checks the plugin's contents first then delegates to the system loaders.

Overrides:
getResource in class java.lang.ClassLoader
Parameters:
name - the name of the resource.
Returns:
the URL to the resource, null if the resource was not found.

close

public void close()


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.