org.ops4j.pax.swissbox.core
Class BundleUtils
java.lang.Object
org.ops4j.pax.swissbox.core.BundleUtils
public class BundleUtils
- extends Object
Utilities related to bundles.
- Since:
- 0.1.0, January 11, 2008
- Author:
- Alin Dreghiciu
Method Summary |
static org.osgi.framework.BundleContext |
getBundleContext(org.osgi.framework.Bundle bundle)
Discovers the bundle context for a bundle. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BundleUtils
public BundleUtils()
getBundleContext
public static org.osgi.framework.BundleContext getBundleContext(org.osgi.framework.Bundle bundle)
- Discovers the bundle context for a bundle. If the bundle is an 4.1.0 or greather bundle it should have a method
that just returns the bundle context. Otherwise uses reflection to look for an internal bundle context.
- Parameters:
bundle
- the bundle from which the bundle context is needed
- Returns:
- corresponding bundle context or null if bundle context cannot be discovered
Copyright © 2006-2011 OPS4J - Open Participation Software for Java. All Rights Reserved.