public class JRubyOSGiBundleClassLoader extends ClassLoader implements org.osgi.framework.BundleReference
Constructor and Description |
---|
JRubyOSGiBundleClassLoader() |
JRubyOSGiBundleClassLoader(org.osgi.framework.Bundle creator) |
Modifier and Type | Method and Description |
---|---|
boolean |
addBundle(org.osgi.framework.Bundle bundle) |
void |
addBundle(Class<?> classInOsgiBundle) |
protected Class<?> |
findClass(String name) |
org.osgi.framework.Bundle |
getBundle()
Returns the
Bundle that defined this web-application. |
URL |
getResource(String name) |
Enumeration<URL> |
getResources(String name)
TODO: optimize: we should not have to look for the resources everywhere
until called for it.
|
boolean |
removeBundle(org.osgi.framework.Bundle bundle) |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResourceAsStream, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public JRubyOSGiBundleClassLoader()
- IOException
public JRubyOSGiBundleClassLoader(org.osgi.framework.Bundle creator)
- IOException
public void addBundle(Class<?> classInOsgiBundle)
- IOException
public boolean addBundle(org.osgi.framework.Bundle bundle)
parent
- The parent classloader. In this case jrubyLoadercontext
- The WebAppContextcontributor
- The bundle that defines this web-application.IOException
public boolean removeBundle(org.osgi.framework.Bundle bundle) throws IOException
parent
- The parent classloader. In this case jrubyLoadercontext
- The WebAppContextcontributor
- The bundle that defines this web-application.IOException
public org.osgi.framework.Bundle getBundle()
Bundle
that defined this web-application.getBundle
in interface org.osgi.framework.BundleReference
Bundle
object associated with this
BundleReference
.public Enumeration<URL> getResources(String name) throws IOException
getResources
in class ClassLoader
IOException
public URL getResource(String name)
getResource
in class ClassLoader
protected Class<?> findClass(String name) throws ClassNotFoundException
findClass
in class ClassLoader
ClassNotFoundException
Copyright © 2001-2015 JRuby. All Rights Reserved.