diff options
author | Thomas Watson | 2008-02-12 16:20:17 +0000 |
---|---|---|
committer | Thomas Watson | 2008-02-12 16:20:17 +0000 |
commit | 24bf22274a62fa2b11318d82bad1d215a4725986 (patch) | |
tree | 3365d5f428dc240f535c82e24df9d3d91a7afedf /bundles/org.eclipse.osgi/core/adaptor/org | |
parent | a908375cbcfc3e4870da6b0f033c114f0c3fc8b1 (diff) | |
download | rt.equinox.framework-24bf22274a62fa2b11318d82bad1d215a4725986.tar.gz rt.equinox.framework-24bf22274a62fa2b11318d82bad1d215a4725986.tar.xz rt.equinox.framework-24bf22274a62fa2b11318d82bad1d215a4725986.zip |
Bug 217724 Substitutable exports and require-bundle
Diffstat (limited to 'bundles/org.eclipse.osgi/core/adaptor/org')
3 files changed, 30 insertions, 2 deletions
diff --git a/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/BundleDescription.java b/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/BundleDescription.java index 1074c316c..449361c1f 100644 --- a/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/BundleDescription.java +++ b/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/BundleDescription.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2007 IBM Corporation and others. + * Copyright (c) 2003, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -236,4 +236,11 @@ public interface BundleDescription extends BaseDescription { * @return the native code specification. */ public NativeCodeSpecification getNativeCodeSpecification(); + + /** + * Returns that satisfy imported packages for this bundle description + * and substitute one of the exports for this bundle description + * @return all substituted exports for this bundle description + */ + public ExportPackageDescription[] getSubstitutedExports(); } diff --git a/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/ExportPackageDescription.java b/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/ExportPackageDescription.java index bbd01b650..789aac403 100644 --- a/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/ExportPackageDescription.java +++ b/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/ExportPackageDescription.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2007 IBM Corporation and others. + * Copyright (c) 2003, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -27,6 +27,8 @@ public interface ExportPackageDescription extends BaseDescription { * A ExportPackageDescription is not a root package the exporting bundle * is re-exporting the package using the Reexport-Package header. * @return true if the export package is a root package; false otherwise + * @deprecated all export package descriptions are roots. The Reexport-Package header + * never became API. */ public boolean isRoot(); diff --git a/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/State.java b/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/State.java index 304244ed8..2fb96de0c 100644 --- a/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/State.java +++ b/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/State.java @@ -187,10 +187,29 @@ public interface State { * @param resolvedRequires the BundleDescriptions that resolve the required bundles for this bundle, can be <code>null</code> * @param resolvedImports the exported packages that resolve the imports for this bundle, can be <code>null</code> * @throws IllegalStateException if this is not done during a call to <code>resolve</code> + * @deprecated use {@link #resolveBundle(BundleDescription, boolean, BundleDescription[], ExportPackageDescription[], ExportPackageDescription[], BundleDescription[], ExportPackageDescription[])} */ public void resolveBundle(BundleDescription bundle, boolean status, BundleDescription[] hosts, ExportPackageDescription[] selectedExports, BundleDescription[] resolvedRequires, ExportPackageDescription[] resolvedImports); /** + * Sets whether or not the given bundle is selected in this state. + * <p> + * This method is intended to be used by resolvers in the process of + * determining which constraints are satisfied by which components. + * </p> + * + * @param bundle the bundle to update + * @param status whether or not the given bundle is resolved, if false the other parameters are ignored + * @param hosts the host for the resolve fragment, can be <code>null</code> + * @param selectedExports the selected exported packages for this resolved bundle, can be <code>null</code> + * @param substitutedExports the exported packages that resolve imports for this bundle and substitute exports, can be <code>null</code> + * @param resolvedRequires the BundleDescriptions that resolve the required bundles for this bundle, can be <code>null</code> + * @param resolvedImports the exported packages that resolve the imports for this bundle, can be <code>null</code> + * @throws IllegalStateException if this is not done during a call to <code>resolve</code> + */ + public void resolveBundle(BundleDescription bundle, boolean status, BundleDescription[] hosts, ExportPackageDescription[] selectedExports, ExportPackageDescription[] substitutedExports, BundleDescription[] resolvedRequires, ExportPackageDescription[] resolvedImports); + + /** * Sets the given removal pending bundle to removal complete for this state. * <p> * This method is intended to be used by resolvers in the process of |