Package org.apache.aries.util
Class AriesFrameworkUtil
- java.lang.Object
 - 
- org.apache.aries.util.AriesFrameworkUtil
 
 
- 
public final class AriesFrameworkUtil extends java.lang.Object 
- 
- 
Constructor Summary
Constructors Constructor Description AriesFrameworkUtil() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.ClassLoadergetClassLoader(Bundle b)This method attempts to get the classloader for a bundle.static java.lang.ClassLoadergetClassLoaderForced(Bundle b)This method attempts to get the classloader for a bundle.static voidsafeUnregisterService(ServiceRegistration reg)Safely unregister the supplied ServiceRegistration, for when you don't care about the potential IllegalStateException and don't want it to run wild through your code 
 - 
 
- 
- 
Method Detail
- 
getClassLoader
public static java.lang.ClassLoader getClassLoader(Bundle b)
This method attempts to get the classloader for a bundle. It may return null if their is no such classloader, or if it cannot obtain the classloader for the bundle.- Parameters:
 b- the bundle whose classloader is desired.- Returns:
 - the classloader if found, or null if for example the bundle is in INSTALLED or UNINSTALLED state
 
 
- 
getClassLoaderForced
public static java.lang.ClassLoader getClassLoaderForced(Bundle b)
This method attempts to get the classloader for a bundle. It will force the creation of a classloader, so if no classloader exists. If the bundle is in installed state, but cannot be resolved the null will be returned.- Parameters:
 b- the bundle to get a classloader for- Returns:
 - the classloader.
 
 
- 
safeUnregisterService
public static void safeUnregisterService(ServiceRegistration reg)
Safely unregister the supplied ServiceRegistration, for when you don't care about the potential IllegalStateException and don't want it to run wild through your code- Parameters:
 reg- TheServiceRegistration, may be null
 
 - 
 
 -