Using the OSGi API, how do I find out if a given bundle is a fragment?
===

In the OSGi API, a call to [BundleContext.getBundles()][1] returns all bundles, whether they are fragments or not. For a given [Bundle][2] object, what is the best way to tell if this is a fragment or not?

  [1]: http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/BundleContext.html#getBundles%28%29
  [2]: http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/Bundle.html