org.eclipse.osgi.baseadaptor.loader
Interface BaseClassLoader

All Superinterfaces:
BundleClassLoader

public interface BaseClassLoader
extends BundleClassLoader

The actual class loader object used to define classes for a classpath manager. This interface provides public versions of a few methods on class loader.

Since:
3.2
See Also:
ClasspathManager

Method Summary
 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.
 ClasspathManager getClasspathManager()
          Returns the ClasspathManager for this BaseClassLoader
 java.security.ProtectionDomain getDomain()
          Returns the domain for the host bundle of this class loader
 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 interface org.eclipse.osgi.framework.adaptor.BundleClassLoader
attachFragment, close, findLocalClass, findLocalResource, findLocalResources, getDelegate, getParent, getResource, getResources, initialize, loadClass
 

Method Detail

getDomain

java.security.ProtectionDomain getDomain()
Returns the domain for the host bundle of this class loader

Returns:
the domain for the host bundle of this class loader

createClassPathEntry

ClasspathEntry createClassPathEntry(BundleFile bundlefile,
                                    java.security.ProtectionDomain cpDomain)
Creates a classpath entry with the given bundle file and domain

Parameters:
bundlefile - the source bundle file for a classpath entry
cpDomain - the source domain for a classpath entry
Returns:
a classpath entry with the given bundle file and domain

defineClass

java.lang.Class defineClass(java.lang.String name,
                            byte[] classbytes,
                            ClasspathEntry classpathEntry,
                            BundleEntry entry)
Defines a Class.

Parameters:
name - the name of the class to define
classbytes - the bytes of the class to define
classpathEntry - the classpath entry used to load the class bytes
entry - the bundle entry used to load the class bytes
Returns:
a defined Class

publicFindLoaded

java.lang.Class publicFindLoaded(java.lang.String classname)
A public version of the ClassLoader.findLoadedClass(java.lang.String) method.

Parameters:
classname - the class name to find.
Returns:
a loaded class

publicGetPackage

java.lang.Object publicGetPackage(java.lang.String pkgname)
A public version of the ClassLoader.getPackage(java.lang.String) method.

Parameters:
pkgname - the package name to get.
Returns:
the package or null if it does not exist

publicDefinePackage

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.

Returns:
a defined Package

getClasspathManager

ClasspathManager getClasspathManager()
Returns the ClasspathManager for this BaseClassLoader

Returns:
the ClasspathManager