|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClassLoaderDelegate
A ClassLoaderDelegate is used by the BundleClassLoader in a similar fashion that a parent ClassLoader is used. A ClassLoaderDelegate must be queried for any resource or class before it is loaded by the BundleClassLoader. The Framework implements the ClassLoaderDelegate and supplies it to the BundleClassLoader. FrameworkAdaptor implementations are not responsible for suppling an implementation for ClassLoaderDelegate.
This interface is not intended to be implemented by clients.
Method Summary | |
---|---|
java.lang.Class |
findClass(java.lang.String classname)
Finds a class for a bundle that may be outside of the actual bundle (i.e. a class from an imported package or required bundle). |
java.lang.String |
findLibrary(java.lang.String libraryname)
Returns the absolute path name of a native library. |
java.net.URL |
findResource(java.lang.String resource)
Finds a resource for a bundle that may be outside of the actual bundle (i.e. a resource from an imported package or required bundle). |
java.util.Enumeration |
findResources(java.lang.String resource)
Finds an enumeration of resources for a bundle that may be outside of the actual bundle (i.e. a resource from an imported package or required bundle). |
Method Detail |
---|
java.lang.Class findClass(java.lang.String classname) throws java.lang.ClassNotFoundException
If the class does not belong to an imported package or is not found in a required bundle then the ClassloaderDelegate will call BundleClassLoader.findLocalClass().
If no class is found then a ClassNotFoundException is thrown.
classname
- the class to find.
java.lang.ClassNotFoundException
- if the class is not found.java.net.URL findResource(java.lang.String resource)
If the resource does not belong to an imported package or is not found in a required bundle then the ClassloaderDelegate will call BundleClassLoader.findLocalResource().
If no resource is found then return null.
resource
- the resource to load.
java.util.Enumeration findResources(java.lang.String resource) throws java.io.IOException
If the resource does not belong to an imported package or is not found in a required bundle then the ClassloaderDelegate will call BundleClassLoader.findLocalResource().
If no resource is found then return null.
resource
- the resource to find.
java.io.IOException
java.lang.String findLibrary(java.lang.String libraryname)
libraryname
- the library to find the path to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |