public void put(V[] versionSuppliers) { for (int i = 0; i < versionSuppliers.length; i++) put(versionSuppliers[i].getName(), versionSuppliers[i]); }
public void put(V[] versionSuppliers) { for (int i = 0; i < versionSuppliers.length; i++) put(versionSuppliers[i].getName(), versionSuppliers[i]); }
public void put(V[] versionSuppliers) { for (int i = 0; i < versionSuppliers.length; i++) put(versionSuppliers[i].getName(), versionSuppliers[i]); }
public void put(V[] versionSuppliers) { for (int i = 0; i < versionSuppliers.length; i++) put(versionSuppliers[i].getName(), versionSuppliers[i]); }
public void bundleAdded(BundleDescription bundle) { if (!initialized) return; if (bundleMapping.get(bundle) != null) return; // this description already exists in the resolver ResolverBundle rb = new ResolverBundle(bundle, this); bundleMapping.put(bundle, rb); unresolvedBundles.add(rb); resolverExports.put(rb.getExportPackages()); resolverBundles.put(rb.getName(), rb); addGenerics(rb.getGenericCapabilities()); }
void addGenerics(GenericCapability[] generics) { for (GenericCapability capability : generics) { String type = capability.getGenericDescription().getType(); VersionHashMap<GenericCapability> namespace = resolverGenerics.get(type); if (namespace == null) { namespace = new VersionHashMap<GenericCapability>(this); resolverGenerics.put(type, namespace); } namespace.put(capability.getName(), capability); } } }
public void bundleAdded(BundleDescription bundle) { if (!initialized) return; if (bundleMapping.get(bundle) != null) return; // this description already exists in the resolver ResolverBundle rb = new ResolverBundle(bundle, this); bundleMapping.put(bundle, rb); unresolvedBundles.add(rb); resolverExports.put(rb.getExportPackages()); resolverBundles.put(rb.getName(), rb); addGenerics(rb.getGenericCapabilities()); if (hook != null && rb.isFragment()) { attachFragment0(rb); } }
public void bundleAdded(BundleDescription bundle) { if (!initialized) return; if (bundleMapping.get(bundle) != null) return; // this description already exists in the resolver ResolverBundle rb = new ResolverBundle(bundle, this); bundleMapping.put(bundle, rb); unresolvedBundles.add(rb); resolverExports.put(rb.getExportPackages()); resolverBundles.put(rb.getName(), rb); addGenerics(rb.getGenericCapabilities()); if (hook != null && rb.isFragment()) { attachFragment0(rb); } }
public void bundleAdded(BundleDescription bundle) { if (!initialized) return; if (bundleMapping.get(bundle) != null) return; // this description already exists in the resolver ResolverBundle rb = new ResolverBundle(bundle, this); bundleMapping.put(bundle, rb); unresolvedBundles.add(rb); resolverExports.put(rb.getExportPackages()); resolverBundles.put(rb.getName(), rb); addGenerics(rb.getGenericCapabilities()); if (hook != null && rb.isFragment()) { attachFragment0(rb); } }
void addGenerics(GenericCapability[] generics) { for (GenericCapability capability : generics) { if (!capability.isEffective()) continue; String type = capability.getGenericDescription().getType(); VersionHashMap<GenericCapability> namespace = resolverGenerics.get(type); if (namespace == null) { namespace = new VersionHashMap<>(this); resolverGenerics.put(type, namespace); } namespace.put(capability.getName(), capability); } }
void addGenerics(GenericCapability[] generics) { for (GenericCapability capability : generics) { if (!capability.isEffective()) continue; String type = capability.getGenericDescription().getType(); VersionHashMap<GenericCapability> namespace = resolverGenerics.get(type); if (namespace == null) { namespace = new VersionHashMap<GenericCapability>(this); resolverGenerics.put(type, namespace); } namespace.put(capability.getName(), capability); } } }
void addGenerics(GenericCapability[] generics) { for (GenericCapability capability : generics) { if (!capability.isEffective()) continue; String type = capability.getGenericDescription().getType(); VersionHashMap<GenericCapability> namespace = resolverGenerics.get(type); if (namespace == null) { namespace = new VersionHashMap<GenericCapability>(this); resolverGenerics.put(type, namespace); } namespace.put(capability.getName(), capability); } } }
private void initResolverBundle(BundleDescription bundleDesc, ArrayList<ResolverBundle> fragmentBundles, boolean pending) { ResolverBundle bundle = new ResolverBundle(bundleDesc, this); bundleMapping.put(bundleDesc, bundle); if (!pending || bundleDesc.isResolved()) { resolverExports.put(bundle.getExportPackages()); resolverBundles.put(bundle.getName(), bundle); addGenerics(bundle.getGenericCapabilities()); } if (bundleDesc.isResolved()) { bundle.setState(ResolverBundle.RESOLVED); if (bundleDesc.getHost() != null) fragmentBundles.add(bundle); } else { if (!pending) unresolvedBundles.add(bundle); } }
private void initResolverBundle(BundleDescription bundleDesc, ArrayList<ResolverBundle> fragmentBundles, boolean pending) { ResolverBundle bundle = new ResolverBundle(bundleDesc, this); bundleMapping.put(bundleDesc, bundle); if (!pending || bundleDesc.isResolved()) { resolverExports.put(bundle.getExportPackages()); resolverBundles.put(bundle.getName(), bundle); addGenerics(bundle.getGenericCapabilities()); } if (bundleDesc.isResolved()) { bundle.setState(ResolverBundle.RESOLVED); if (bundleDesc.getHost() != null) fragmentBundles.add(bundle); } else { if (!pending) unresolvedBundles.add(bundle); } }
private void initResolverBundle(BundleDescription bundleDesc, ArrayList<ResolverBundle> fragmentBundles, boolean pending) { ResolverBundle bundle = new ResolverBundle(bundleDesc, this); bundleMapping.put(bundleDesc, bundle); if (!pending || bundleDesc.isResolved()) { resolverExports.put(bundle.getExportPackages()); resolverBundles.put(bundle.getName(), bundle); addGenerics(bundle.getGenericCapabilities()); } if (bundleDesc.isResolved()) { bundle.setState(ResolverBundle.RESOLVED); if (bundleDesc.getHost() != null) fragmentBundles.add(bundle); } else { if (!pending) unresolvedBundles.add(bundle); } }
private void initResolverBundle(BundleDescription bundleDesc, ArrayList<ResolverBundle> fragmentBundles, boolean pending) { ResolverBundle bundle = new ResolverBundle(bundleDesc, this); bundleMapping.put(bundleDesc, bundle); if (!pending || bundleDesc.isResolved()) { resolverExports.put(bundle.getExportPackages()); resolverBundles.put(bundle.getName(), bundle); addGenerics(bundle.getGenericCapabilities()); } if (bundleDesc.isResolved()) { bundle.setState(ResolverBundle.RESOLVED); if (bundleDesc.getHost() != null) fragmentBundles.add(bundle); } else { if (!pending) unresolvedBundles.add(bundle); } }
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); }