org.jboss.osgi.spi.util
Class BundleClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by org.jboss.osgi.spi.util.BundleClassLoader

public final class BundleClassLoader
extends ClassLoader

A BundleClassLoader delegates all classloading concerns to the underlying Bundle.

Since:
03-Feb-2009
Author:
Ales.Justin@jboss.org, thomas.Diesler@jboss.org

Method Summary
static BundleClassLoader createClassLoader(Bundle bundle)
           
 boolean equals(Object obj)
           
protected  Class<?> findClass(String name)
           
protected  URL findResource(String name)
           
protected  Enumeration<URL> findResources(String name)
           
 URL getResource(String name)
           
 int hashCode()
           
 Class<?> loadClass(String name)
           
 String toString()
           
 
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, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

createClassLoader

public static BundleClassLoader createClassLoader(Bundle bundle)

findClass

protected Class<?> findClass(String name)
                      throws ClassNotFoundException
Overrides:
findClass in class ClassLoader
Throws:
ClassNotFoundException

findResource

protected URL findResource(String name)
Overrides:
findResource in class ClassLoader

findResources

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

getResource

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

loadClass

public Class<?> loadClass(String name)
                   throws ClassNotFoundException
Overrides:
loadClass in class ClassLoader
Throws:
ClassNotFoundException

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.