public RecursiveBundleTracker(BundleContext context, int stateMask, BundleTrackerCustomizer customizer) {
//This test only makes sense for composite bundles, but in the interests of more consistent behavior lets leave it.
// We always need INSTALLED events so we can recursively listen to the frameworks
if ((stateMask & COMPOSITE_BUNDLE_MASK) != COMPOSITE_BUNDLE_MASK)
throw new IllegalArgumentException();
BundleTracker tracker = null;
try {
//R43, equinox composite bundles seem to produce appropriate bundle event hook notifications
tracker = new BundleHookBundleTracker(context, stateMask, customizer);
} catch (Throwable e) {
}
if (areMultipleFrameworksAvailable(context)) {
compositeTracker = new InternalRecursiveBundleTracker(context, stateMask, customizer, tracker == null);
} else {
compositeTracker = null;
}
if (tracker == null && compositeTracker == null) {
//R42
tracker = new BundleTracker(context, stateMask, customizer);
}
this.tracker = tracker;
}