private void setBundleUnresolved(ResolverBundle bundle, boolean removed, boolean keepFragsAttached) { if (bundle.getState() == ResolverBundle.UNRESOLVED && !developmentMode) // in this case there is nothing more to do return; // Note that when in dev mode we only want to force the fragment detach if asked to; // this would be done only when forcing a dependency chain to unresolve from unresolveBundle method if (removed || !keepFragsAttached) { // Force the initialization of the bundle, its exports and its capabilities. This is needed to force proper attachment of fragments. resolverExports.remove(bundle.getExportPackages()); removeGenerics(bundle.getGenericCapabilities()); bundle.detachAllFragments(); bundle.initialize(false); if (!removed) { // add back the available exports/capabilities resolverExports.put(bundle.getExportPackages()); addGenerics(bundle.getGenericCapabilities()); } } // TODO unresolvedBundles should be a set; for now only need to do a contains check in devMode. if (!removed && (!developmentMode || !unresolvedBundles.contains(bundle))) unresolvedBundles.add(bundle); bundle.setState(ResolverBundle.UNRESOLVED); }
private void setBundleUnresolved(ResolverBundle bundle, boolean removed, boolean keepFragsAttached) { if (bundle.getState() == ResolverBundle.UNRESOLVED && !developmentMode) // in this case there is nothing more to do return; // Note that when in dev mode we only want to force the fragment detach if asked to; // this would be done only when forcing a dependency chain to unresolve from unresolveBundle method if (removed || !keepFragsAttached) { // Force the initialization of the bundle, its exports and its capabilities. This is needed to force proper attachment of fragments. resolverExports.remove(bundle.getExportPackages()); removeGenerics(bundle.getGenericCapabilities()); bundle.detachAllFragments(); bundle.initialize(false); if (!removed) { // add back the available exports/capabilities resolverExports.put(bundle.getExportPackages()); addGenerics(bundle.getGenericCapabilities()); } } // TODO unresolvedBundles should be a set; for now only need to do a contains check in devMode. if (!removed && (!developmentMode || !unresolvedBundles.contains(bundle))) unresolvedBundles.add(bundle); bundle.setState(ResolverBundle.UNRESOLVED); }
private void setBundleUnresolved(ResolverBundle bundle, boolean removed, boolean keepFragsAttached) { if (bundle.getState() == ResolverBundle.UNRESOLVED && !developmentMode) // in this case there is nothing more to do return; // Note that when in dev mode we only want to force the fragment detach if asked to; // this would be done only when forcing a dependency chain to unresolve from unresolveBundle method if (removed || !keepFragsAttached) { // Force the initialization of the bundle, its exports and its capabilities. This is needed to force proper attachment of fragments. resolverExports.remove(bundle.getExportPackages()); removeGenerics(bundle.getGenericCapabilities()); bundle.detachAllFragments(); bundle.detachFromHosts(); bundle.initialize(false); if (!removed) { // add back the available exports/capabilities resolverExports.put(bundle.getExportPackages()); addGenerics(bundle.getGenericCapabilities()); } } // TODO unresolvedBundles should be a set; for now only need to do a contains check in devMode. if (!removed && (!developmentMode || !unresolvedBundles.contains(bundle))) unresolvedBundles.add(bundle); bundle.setState(ResolverBundle.UNRESOLVED); }
private void setBundleUnresolved(ResolverBundle bundle, boolean removed, boolean keepFragsAttached) { if (bundle.getState() == ResolverBundle.UNRESOLVED && !developmentMode) // in this case there is nothing more to do return; // Note that when in dev mode we only want to force the fragment detach if asked to; // this would be done only when forcing a dependency chain to unresolve from unresolveBundle method if (removed || !keepFragsAttached) { // Force the initialization of the bundle, its exports and its capabilities. This is needed to force proper attachment of fragments. resolverExports.remove(bundle.getExportPackages()); removeGenerics(bundle.getGenericCapabilities()); bundle.detachAllFragments(); bundle.detachFromHosts(); bundle.initialize(false); if (!removed) { // add back the available exports/capabilities resolverExports.put(bundle.getExportPackages()); addGenerics(bundle.getGenericCapabilities()); } } // TODO unresolvedBundles should be a set; for now only need to do a contains check in devMode. if (!removed && (!developmentMode || !unresolvedBundles.contains(bundle))) unresolvedBundles.add(bundle); bundle.setState(ResolverBundle.UNRESOLVED); }