java.io.Closeable, java.lang.AutoCloseable, DelegatingBundleReference, org.osgi.framework.BundleReferencepublic class EquinoxBundleClassLoader extends java.net.URLClassLoader implements DelegatingBundleReference
Bundle.
URLClassLoader and converts resource "bundle"
URLs (found in directories or embedded jar files) into regular jar URLs.
This ClassLoader implementation will only work on Equinox framework.| Constructor | Description |
|---|---|
EquinoxBundleClassLoader(org.osgi.framework.Bundle bundle) |
|
EquinoxBundleClassLoader(org.osgi.framework.Bundle bundle,
boolean searchWiredBundles,
boolean convertResourceUrls) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object other) |
|
java.util.Enumeration<java.net.URL> |
findResources(java.lang.String name) |
|
org.osgi.framework.Bundle |
getBundle() |
Return the bundle associated with this classloader.
|
org.osgi.framework.Bundle |
getBundle(boolean unwrap) |
Return the bundle associated with this classloader.
|
boolean |
getConvertResourceUrls() |
|
java.net.URL |
getResource(java.lang.String name) |
|
boolean |
getSearchWiredBundles() |
|
int |
hashCode() |
|
protected java.lang.Class<?> |
loadClass(java.lang.String name,
boolean resolve) |
|
void |
setConvertResourceUrls(boolean convert) |
|
void |
setSearchWiredBundles(boolean search) |
|
java.lang.String |
toString() |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic EquinoxBundleClassLoader(org.osgi.framework.Bundle bundle)
public EquinoxBundleClassLoader(org.osgi.framework.Bundle bundle,
boolean searchWiredBundles,
boolean convertResourceUrls)
public java.lang.String toString()
toString in class java.lang.Objectprotected java.lang.Class<?> loadClass(java.lang.String name,
boolean resolve)
throws java.lang.ClassNotFoundException
loadClass in class java.lang.ClassLoaderjava.lang.ClassNotFoundExceptionpublic java.net.URL getResource(java.lang.String name)
getResource in class java.lang.ClassLoaderpublic java.util.Enumeration<java.net.URL> findResources(java.lang.String name)
throws java.io.IOException
findResources in class java.net.URLClassLoaderjava.io.IOExceptionpublic void setSearchWiredBundles(boolean search)
public boolean getSearchWiredBundles()
public void setConvertResourceUrls(boolean convert)
public boolean getConvertResourceUrls()
public org.osgi.framework.Bundle getBundle(boolean unwrap)
DelegatingBundle.
In such cases, the unwrap parameter controls whether this function returns the
DelegatingBundle instance or the main application bundle backing with the DelegatingBundle.getBundle in interface DelegatingBundleReferenceunwrap - If true and if the bundle associated with this classloader is a DelegatingBundle,
this function will return the main application bundle backing with the DelegatingBundle.
Otherwise, the bundle associated with this classloader is returned as is.public org.osgi.framework.Bundle getBundle()
getBundle(true) and therefore always returns a regular
framework bundle.
BundleReference.getBundle() to obtain a bundle for the given
classloader and expect the returned bundle instance to be work with any OSGi API. Some of these API might
not work if DelegatingBundle is returned. That is why this function will always return
a regular framework bundle. See getBundle(boolean) for more information.getBundle in interface org.osgi.framework.BundleReferencepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.ObjectCopyright © 2005–2018. All rights reserved.