Loads the specified class using this bundle's class loader.
If this bundle is a fragment bundle then this method must throw a ClassNotFoundException
.
If this bundle's state is INSTALLED
, this method must attempt to resolve this bundle before attempting to load the class.
If this bundle cannot be resolved, a Framework event of type {@link FrameworkEvent#ERROR} is fired containing aBundleException
with details of the reason this bundle could not be resolved. This method must then throw a ClassNotFoundException
.
If this bundle's state is UNINSTALLED
, then an IllegalStateException
is thrown.
@param name The name of the class to load.
@return The Class object for the requested class.
@throws ClassNotFoundException If no such class can be found orif this bundle is a fragment bundle or if the caller does not have the appropriate AdminPermission[this,CLASS]
, and the Java Runtime Environment supports permissions.
@throws IllegalStateException If this bundle has beenuninstalled.
@since 1.3