org.apache.geronimo.blueprint.utils
Class BundleDelegatingClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by org.apache.geronimo.blueprint.utils.BundleDelegatingClassLoader

public class BundleDelegatingClassLoader
extends ClassLoader

A ClassLoader delegating to a given OSGi bundle.

Version:
$Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
Author:
Apache Geronimo Project

Constructor Summary
BundleDelegatingClassLoader(org.osgi.framework.Bundle bundle)
           
BundleDelegatingClassLoader(org.osgi.framework.Bundle bundle, ClassLoader classLoader)
           
 
Method Summary
protected  Class findClass(String name)
           
protected  URL findResource(String name)
           
protected  Enumeration findResources(String name)
           
 org.osgi.framework.Bundle getBundle()
           
protected  Class loadClass(String name, boolean resolve)
           
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, 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

BundleDelegatingClassLoader

public BundleDelegatingClassLoader(org.osgi.framework.Bundle bundle)

BundleDelegatingClassLoader

public BundleDelegatingClassLoader(org.osgi.framework.Bundle bundle,
                                   ClassLoader classLoader)
Method Detail

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 findResources(String name)
                             throws IOException
Overrides:
findResources in class ClassLoader
Throws:
IOException

loadClass

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

getBundle

public org.osgi.framework.Bundle getBundle()


Copyright © 2003-2009 The Apache Software Foundation. All Rights Reserved.