Class OSGIListener.ClassCodeBaseHandlerImpl
java.lang.Object
com.sun.corba.ee.impl.osgi.loader.OSGIListener.ClassCodeBaseHandlerImpl
- All Implemented Interfaces:
ClassCodeBaseHandler
- Enclosing class:
OSGIListener
private static class OSGIListener.ClassCodeBaseHandlerImpl
extends Object
implements ClassCodeBaseHandler
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
classNotFoundInBundle
(String name) private void
classNotFoundInBundleVersion
(String cname, String bname, String version) private void
couldNotLoadClassInBundle
(ClassNotFoundException exc, String className, String bname) private void
foundClassInBundleVersion
(Class<?> cls, String name, String version) private void
foundClassInBundleVersion
(String cname, String bname, String version) getCodeBase
(Class<?> cls) Returns some sort of codebase for the given class, or null.Class
<?> load a class given the classname and a codebase.
-
Field Details
-
PREFIX
- See Also:
-
-
Constructor Details
-
ClassCodeBaseHandlerImpl
private ClassCodeBaseHandlerImpl()
-
-
Method Details
-
classNotFoundInBundle
-
foundClassInBundleVersion
-
getCodeBase
Description copied from interface:ClassCodeBaseHandler
Returns some sort of codebase for the given class, or null. It is expected that, if str is the result of getCodeBase( cls ), then loadClass( str, cls.getClassName() ) will return cls.- Specified by:
getCodeBase
in interfaceClassCodeBaseHandler
- Parameters:
cls
- Class for which we need a codebase- Returns:
- A codebase to use with this handler, or null if this handler does not apply to this class.
-
couldNotLoadClassInBundle
@InfoMethod private void couldNotLoadClassInBundle(ClassNotFoundException exc, String className, String bname) -
foundClassInBundleVersion
-
classNotFoundInBundleVersion
-
loadClass
Description copied from interface:ClassCodeBaseHandler
load a class given the classname and a codebase. The className will always satisfy cls.getClassName().equals( className ) if the call succeeds and returns a Class.- Specified by:
loadClass
in interfaceClassCodeBaseHandler
- Parameters:
codebase
- A string that somehow describes which ClassLoader to use. For example, the string could be an ordinary URL that a URL ClassLoader can use, or something more specialized, such as a description of an OSGi bundles and version.className
- The name of the class to load- Returns:
- The loaded class, or null if the class could not be loaded.
-