KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > osgi > internal > module > ResolverExport


1 /*******************************************************************************
2  * Copyright (c) 2004, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.osgi.internal.module;
12
13 import org.eclipse.osgi.service.resolver.BundleDescription;
14 import org.eclipse.osgi.service.resolver.ExportPackageDescription;
15 import org.osgi.framework.Constants;
16
17 /*
18  * A companion to ExportPackageDescription from the state used while resolving.
19  */

20 public class ResolverExport extends VersionSupplier {
21     private ResolverBundle resolverBundle;
22
23     ResolverExport(ResolverBundle resolverBundle, ExportPackageDescription epd) {
24         super(epd);
25         this.resolverBundle = resolverBundle;
26     }
27
28     public ExportPackageDescription getExportPackageDescription() {
29         return (ExportPackageDescription) base;
30     }
31
32     public BundleDescription getBundle() {
33         return getExportPackageDescription().getExporter();
34     }
35
36     ResolverBundle getExporter() {
37         return resolverBundle;
38     }
39
40     String JavaDoc[] getUsesDirective() {
41         return (String JavaDoc[]) getExportPackageDescription().getDirective(Constants.USES_DIRECTIVE);
42     }
43 }
44
Popular Tags