|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ClassLoader
org.eclipse.osgi.internal.composite.CompositeClassLoader
public class CompositeClassLoader
| Constructor Summary | |
|---|---|
CompositeClassLoader(java.lang.ClassLoader parent,
ClassLoaderDelegate delegate,
ClassLoaderDelegate companionDelegate,
BaseData data)
|
|
| Method Summary | |
|---|---|
void |
attachFragment(BundleData bundledata,
java.security.ProtectionDomain domain,
java.lang.String[] classpath)
Attaches the BundleData for a fragment to this BundleClassLoader. |
void |
close()
Closes this class loader. |
ClasspathEntry |
createClassPathEntry(BundleFile bundlefile,
java.security.ProtectionDomain cpDomain)
Creates a classpath entry with the given bundle file and domain |
java.lang.Class |
defineClass(java.lang.String name,
byte[] classbytes,
ClasspathEntry classpathEntry,
BundleEntry entry)
Defines a Class. |
java.lang.Class |
findLocalClass(java.lang.String classname)
Finds a local class in the BundleClassLoader without consulting the delegate. |
java.net.URL |
findLocalResource(java.lang.String resource)
Finds a local resource in the BundleClassLoader without consulting the delegate. |
java.util.Enumeration |
findLocalResources(java.lang.String resource)
Finds all local resources in the BundleClassLoader with the specified path without consulting the delegate. |
Bundle |
getBundle()
Returns the Bundle object associated with this
BundleReference. |
ClasspathManager |
getClasspathManager()
Returns the ClasspathManager for this BaseClassLoader |
ClassLoaderDelegate |
getDelegate()
Returns the ClassLoaderDelegate used by this BundleClassLoader |
java.security.ProtectionDomain |
getDomain()
Returns the domain for the host bundle of this class loader |
java.net.URL |
getResource(java.lang.String name)
This method will first search the parent class loader for the resource; That failing, this method will invoke ClassLoaderDelegate.findResource(String) to find the resource. |
void |
initialize()
Initializes the ClassLoader. |
java.lang.Class |
loadClass(java.lang.String name)
This method will first search the parent class loader for the class; That failing, this method will invoke ClassLoaderDelegate.findClass(String) to find the resource. |
java.lang.Object |
publicDefinePackage(java.lang.String name,
java.lang.String specTitle,
java.lang.String specVersion,
java.lang.String specVendor,
java.lang.String implTitle,
java.lang.String implVersion,
java.lang.String implVendor,
java.net.URL sealBase)
A public version of the ClassLoader#definePackage(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.net.URL) method. |
java.lang.Class |
publicFindLoaded(java.lang.String classname)
A public version of the ClassLoader.findLoadedClass(java.lang.String) method. |
java.lang.Object |
publicGetPackage(java.lang.String pkgname)
A public version of the ClassLoader#getPackage(java.lang.String) method. |
| Methods inherited from class java.lang.ClassLoader |
|---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, 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 |
| Methods inherited from interface org.eclipse.osgi.framework.adaptor.BundleClassLoader |
|---|
getParent, getResources |
| Constructor Detail |
|---|
public CompositeClassLoader(java.lang.ClassLoader parent,
ClassLoaderDelegate delegate,
ClassLoaderDelegate companionDelegate,
BaseData data)
| Method Detail |
|---|
public ClasspathEntry createClassPathEntry(BundleFile bundlefile,
java.security.ProtectionDomain cpDomain)
BaseClassLoader
createClassPathEntry in interface BaseClassLoaderbundlefile - the source bundle file for a classpath entrycpDomain - the source domain for a classpath entry
public java.lang.Class defineClass(java.lang.String name,
byte[] classbytes,
ClasspathEntry classpathEntry,
BundleEntry entry)
BaseClassLoader
defineClass in interface BaseClassLoadername - the name of the class to defineclassbytes - the bytes of the class to defineclasspathEntry - the classpath entry used to load the class bytesentry - the bundle entry used to load the class bytes
public ClasspathManager getClasspathManager()
BaseClassLoader
getClasspathManager in interface BaseClassLoaderpublic java.security.ProtectionDomain getDomain()
BaseClassLoader
getDomain in interface BaseClassLoader
public java.lang.Object publicDefinePackage(java.lang.String name,
java.lang.String specTitle,
java.lang.String specVersion,
java.lang.String specVendor,
java.lang.String implTitle,
java.lang.String implVersion,
java.lang.String implVendor,
java.net.URL sealBase)
BaseClassLoader
publicDefinePackage in interface BaseClassLoaderpublic java.lang.Class publicFindLoaded(java.lang.String classname)
BaseClassLoader
publicFindLoaded in interface BaseClassLoaderclassname - the class name to find.
public java.lang.Object publicGetPackage(java.lang.String pkgname)
BaseClassLoader
publicGetPackage in interface BaseClassLoaderpkgname - the package name to get.
public void attachFragment(BundleData bundledata,
java.security.ProtectionDomain domain,
java.lang.String[] classpath)
BundleClassLoader
attachFragment in interface BundleClassLoaderbundledata - The BundleData of the fragment.domain - The ProtectionDomain of the resources of the fragment.
Any classes loaded from the fragment's BundleData must belong to this
ProtectionDomain.classpath - An array of Bundle-ClassPath entries to
use for loading classes and resources. This is specified by the
Bundle-ClassPath manifest entry of the fragment.public void close()
BundleClassLoader
close in interface BundleClassLoader
public java.lang.Class findLocalClass(java.lang.String classname)
throws java.lang.ClassNotFoundException
BundleClassLoader
findLocalClass in interface BundleClassLoaderclassname - the classname to find.
java.lang.ClassNotFoundException - if the classname does not exist locally.public java.net.URL findLocalResource(java.lang.String resource)
BundleClassLoader
findLocalResource in interface BundleClassLoaderresource - the resource path to find.
public java.util.Enumeration findLocalResources(java.lang.String resource)
BundleClassLoader
findLocalResources in interface BundleClassLoaderresource - the resource path to find.
public ClassLoaderDelegate getDelegate()
BundleClassLoader
getDelegate in interface BundleClassLoaderpublic java.net.URL getResource(java.lang.String name)
BundleClassLoaderClassLoaderDelegate.findResource(String) to find the resource.
getResource in interface BundleClassLoadergetResource in class java.lang.ClassLoadername - the resource path to get.
null if the resource is not found.public void initialize()
BundleClassLoader
initialize in interface BundleClassLoader
public java.lang.Class loadClass(java.lang.String name)
throws java.lang.ClassNotFoundException
BundleClassLoaderClassLoaderDelegate.findClass(String) to find the resource.
loadClass in interface BundleClassLoaderloadClass in class java.lang.ClassLoadername - the class name to load.
java.lang.ClassNotFoundExceptionpublic Bundle getBundle()
BundleReferenceBundle object associated with this
BundleReference.
getBundle in interface BundleReferenceBundle object associated with this
BundleReference.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||