Package org.apache.aries.util.internal
Class BundleToClassLoaderAdapter
- java.lang.Object
-
- java.lang.ClassLoader
-
- org.apache.aries.util.internal.BundleToClassLoaderAdapter
-
- All Implemented Interfaces:
BundleReference
public class BundleToClassLoaderAdapter extends java.lang.ClassLoader implements BundleReference
-
-
Constructor Summary
Constructors Constructor Description BundleToClassLoaderAdapter(Bundle bundle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bundle
getBundle()
Returns theBundle
object associated with thisBundleReference
.java.net.URL
getResource(java.lang.String name)
java.io.InputStream
getResourceAsStream(java.lang.String name)
java.util.Enumeration<java.net.URL>
getResources(java.lang.String name)
java.lang.Class<?>
loadClass(java.lang.String name, boolean resolve)
-
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, getDefinedPackage, getDefinedPackages, getName, getParent, getPlatformClassLoader, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus
-
-
-
-
Constructor Detail
-
BundleToClassLoaderAdapter
public BundleToClassLoaderAdapter(Bundle bundle)
-
-
Method Detail
-
getResource
public java.net.URL getResource(java.lang.String name)
- Overrides:
getResource
in classjava.lang.ClassLoader
-
getResourceAsStream
public java.io.InputStream getResourceAsStream(java.lang.String name)
- Overrides:
getResourceAsStream
in classjava.lang.ClassLoader
-
getResources
public java.util.Enumeration<java.net.URL> getResources(java.lang.String name) throws java.io.IOException
- Overrides:
getResources
in classjava.lang.ClassLoader
- Throws:
java.io.IOException
-
loadClass
public java.lang.Class<?> loadClass(java.lang.String name, boolean resolve) throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
-
getBundle
public Bundle getBundle()
Description copied from interface:BundleReference
Returns theBundle
object associated with thisBundleReference
.- Specified by:
getBundle
in interfaceBundleReference
- Returns:
- The
Bundle
object associated with thisBundleReference
.
-
-