|
||||||||||
| 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. |
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. |
java.util.Enumeration<java.net.URL> |
findResources(java.lang.String resource)
Finds an enumeration of resources for a bundle that may be outside of the actual bundle (i.e. |
boolean |
isLazyTriggerSet()
Returns true if the lazy trigger has been set for this delegate. |
java.util.Collection<java.lang.String> |
listResources(java.lang.String path,
java.lang.String filePattern,
int options)
Returns the names of resources visible to this delegate. |
void |
setLazyTrigger()
Sets the lazy trigger for this delegate. |
| 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<java.net.URL> 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.IOExceptionjava.lang.String findLibrary(java.lang.String libraryname)
libraryname - the library to find the path to.
boolean isLazyTriggerSet()
void setLazyTrigger()
throws BundleException
BundleException - if an error occurred while activating the bundleisLazyTriggerSet()
java.util.Collection<java.lang.String> listResources(java.lang.String path,
java.lang.String filePattern,
int options)
BundleWiring.listResources(String, String, int) method.
First a search is done on the packages imported by the bundle associated
with this delegate. Next a search is done on the the bundles required by
the bundle associated with this delegate. Finally a local search of
the bundle associated with this delegate is done by calling
BundleClassLoader.listLocalResources(String, String, int). Note
that for imported packages the search stops at the source for the import.
path - 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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||