|
||||||||||
| 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(ClassLoader parent,
ClassLoaderDelegate delegate,
ClassLoaderDelegate companionDelegate,
BaseData data)
|
|
| Method Summary | |
|---|---|
void |
attachFragment(BundleData bundledata,
ProtectionDomain domain,
String[] classpath)
Attaches the BundleData for a fragment to this BundleClassLoader. |
void |
close()
Closes this class loader. |
ClasspathEntry |
createClassPathEntry(BundleFile bundlefile,
ProtectionDomain cpDomain)
Creates a classpath entry with the given bundle file and domain |
Class |
defineClass(String name,
byte[] classbytes,
ClasspathEntry classpathEntry,
BundleEntry entry)
Defines a Class. |
List<URL> |
findEntries(String path,
String filePattern,
int options)
Returns resource entries for the bundle associated with this class loader. |
Class |
findLocalClass(String classname)
Finds a local class in the BundleClassLoader without consulting the delegate. |
URL |
findLocalResource(String resource)
Finds a local resource in the BundleClassLoader without consulting the delegate. |
Enumeration |
findLocalResources(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 |
ProtectionDomain |
getDomain()
Returns the domain for the host bundle of this class loader |
URL |
getResource(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. |
Collection<String> |
listLocalResources(String path,
String filePattern,
int options)
Returns the names of local resources visible to this bundle class loader. |
Collection<String> |
listResources(String path,
String filePattern,
int options)
Returns the names of resources visible to this bundle class loader. |
Class |
loadClass(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. |
Object |
publicDefinePackage(String name,
String specTitle,
String specVersion,
String specVendor,
String implTitle,
String implVersion,
String implVendor,
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. |
Class |
publicFindLoaded(String classname)
A public version of the ClassLoader.findLoadedClass(java.lang.String) method. |
Object |
publicGetPackage(String pkgname)
A public version of the ClassLoader#getPackage(java.lang.String) method. |
| 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(ClassLoader parent,
ClassLoaderDelegate delegate,
ClassLoaderDelegate companionDelegate,
BaseData data)
| Method Detail |
|---|
public ClasspathEntry createClassPathEntry(BundleFile bundlefile,
ProtectionDomain cpDomain)
BaseClassLoader
createClassPathEntry in interface BaseClassLoaderbundlefile - the source bundle file for a classpath entrycpDomain - the source domain for a classpath entry
public Class defineClass(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 ProtectionDomain getDomain()
BaseClassLoader
getDomain in interface BaseClassLoader
public Object publicDefinePackage(String name,
String specTitle,
String specVersion,
String specVendor,
String implTitle,
String implVersion,
String implVendor,
URL sealBase)
BaseClassLoader
publicDefinePackage in interface BaseClassLoaderpublic Class publicFindLoaded(String classname)
BaseClassLoader
publicFindLoaded in interface BaseClassLoaderclassname - the class name to find.
public Object publicGetPackage(String pkgname)
BaseClassLoader
publicGetPackage in interface BaseClassLoaderpkgname - the package name to get.
public void attachFragment(BundleData bundledata,
ProtectionDomain domain,
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 Class findLocalClass(String classname)
throws ClassNotFoundException
BundleClassLoader
findLocalClass in interface BundleClassLoaderclassname - the classname to find.
ClassNotFoundException - if the classname does not exist locally.public URL findLocalResource(String resource)
BundleClassLoader
findLocalResource in interface BundleClassLoaderresource - the resource path to find.
public Enumeration findLocalResources(String resource)
BundleClassLoader
findLocalResources in interface BundleClassLoaderresource - the resource path to find.
public ClassLoaderDelegate getDelegate()
BundleClassLoader
getDelegate in interface BundleClassLoaderpublic URL getResource(String name)
BundleClassLoaderClassLoaderDelegate.findResource(String) to find the resource.
getResource in interface BundleClassLoadergetResource in class ClassLoadername - the resource path to get.
null if the resource is not found.public void initialize()
BundleClassLoader
initialize in interface BundleClassLoader
public Class loadClass(String name)
throws ClassNotFoundException
BundleClassLoaderClassLoaderDelegate.findClass(String) to find the resource.
loadClass in interface BundleClassLoaderloadClass in class ClassLoadername - the class name to load.
ClassNotFoundExceptionpublic Bundle getBundle()
BundleReferenceBundle object associated with this
BundleReference.
getBundle in interface BundleReferenceBundle object associated with this
BundleReference.
public List<URL> findEntries(String path,
String filePattern,
int options)
BundleClassLoaderBundleWiring.findEntries(String, String, int) method.
findEntries in interface BundleClassLoaderpath - The path name in which to look.filePattern - The file name pattern for selecting resource names in
the specified path.options - The options for listing resource names.
BundleWiring#findEntries(String, String, int)}
public Collection<String> listResources(String path,
String filePattern,
int options)
BundleClassLoaderBundleWiring.listResources(String, String, int) method.
This method should simply return the result of calling
ClassLoaderDelegate.listResources(String, String, int)
listResources in interface BundleClassLoaderpath - The path name in which to look.filePattern - The file name pattern for selecting resource names in
the specified path.options - The options for listing resource names.
BundleWiring#listResources(String, String, int)},
ClassLoaderDelegate#listResources(String, String, int)}
public Collection<String> listLocalResources(String path,
String filePattern,
int options)
BundleClassLoader
listLocalResources in interface BundleClassLoaderpath - The path name in which to look.filePattern - The file name pattern for selecting resource names in
the specified path.options - The options for listing resource names.
ClassLoaderDelegate#listResources(String, String, int)}
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||