Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
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 http://www.eclipse.org/legal/epl-v10.html Contributors: IBM Corporation - initial API and implementation /
 
 package org.eclipse.osgi.framework.internal.core;
 
 
 
 public class ExportedPackageImpl implements ExportedPackage {
 
 	private final String specVersion;
 	private final BundleLoaderProxy supplier;
 
 	public ExportedPackageImpl(ExportPackageDescription exportedPackageBundleLoaderProxy supplier) {
 		this. = exportedPackage;
 		this. = supplier;
 		Version version = exportedPackage.getVersion();
 		if (version != null)
 			this. = version.toString();
 		else
 			this. = null;
 	}
 
 	public String getName() {
 	}
 
 		if (.isStale())
 			return null;
 	}
 
 	/*
 	 * get the bundle without checking if it is stale
 	 */
 	}
 
 	public Bundle[] getImportingBundles() {
 		if (.isStale())
 			return null;
 		if (bundle == null)
 			return null;
 		AbstractBundle[] bundles = bundle.framework.getAllBundles();
 		ArrayList importers = new ArrayList(10);
 		for (int i = 0; i < bundles.lengthi++) {
 			if (!(bundles[iinstanceof BundleHost))
 				continue;
 			BundleLoader loader = ((BundleHostbundles[i]).getBundleLoader();
 			if (loader == null || loader.getBundle() == .getBundle())
 				continue// do not include include the exporter of the package
 			PackageSource importerSource = loader.getPackageSource(getName());
 			if (supplierSource != null && supplierSource.hasCommonSource(importerSource))
 				importers.add(bundles[i]);
 		}
 		return (Bundle[]) importers.toArray(new Bundle[importers.size()]);
 	}
 
 		return ;
 	}
 
 	public Version getVersion() {
 	}
 
 	public boolean isRemovalPending() {
 		if (exporter != null)
 			return exporter.isRemovalPending();
 		return true;
 	}
 
 	public String toString() {
 		StringBuffer result = new StringBuffer(getName());
 		if ( != null) {
 			result.append("; ").append(.); //$NON-NLS-1$
 			result.append("=\"").append().append("\""); //$NON-NLS-1$//$NON-NLS-2$
 		}
 		return result.toString();
 	}
New to GrepCode? Check out our FAQ X