return (ExportPackageDescription[]) packageList.toArray(new ExportPackageDescription[packageList.size()]);
return (ExportPackageDescription[]) orderedPkgList.toArray(new ExportPackageDescription[orderedPkgList.size()]);
	public ExportPackageDescription[] getVisiblePackages(BundleDescription bundle) {		StateImpl state = (StateImpl) bundle.getContainingState();		boolean strict = false;		if (state != null)			strict = state.inStrictMode();		ArrayList packageList = new ArrayList(); // list of all ExportPackageDescriptions that are visible		ArrayList importList = new ArrayList(); // list of package names which are directly imported		// get the list of directly imported packages first.		ImportPackageSpecification[] imports = bundle.getImportPackages();		for (int i = 0; i < imports.length; i++) {			ExportPackageDescription pkgSupplier = (ExportPackageDescription) imports[i].getSupplier();			if (pkgSupplier == null)				continue;			if (!isSystemExport(pkgSupplier))				packageList.add(pkgSupplier);			// get the sources of the required bundles of the exporter			BundleSpecification[] requires = pkgSupplier.getExporter().getRequiredBundles();			ArrayList visited = new ArrayList();			for (int j = 0; j < requires.length; j++) {				BundleDescription bundleSupplier = (BundleDescription) requires[j].getSupplier();				if (bundleSupplier != null)					getPackages(bundleSupplier, bundle.getSymbolicName(), importList, packageList, visited, strict, imports[i].getName());			}			importList.add(imports[i].getName()); // besure to add to direct import list		}		// now find all the packages that are visible from required bundles		BundleSpecification[] requires = bundle.getRequiredBundles();		ArrayList visited = new ArrayList(requires.length);		for (int i = 0; i < requires.length; i++) {			BundleDescription bundleSupplier = (BundleDescription) requires[i].getSupplier();			if (bundleSupplier != null)				getPackages(bundleSupplier, bundle.getSymbolicName(), importList, packageList, visited, strict, null);		}		return (ExportPackageDescription[]) packageList.toArray(new ExportPackageDescription[packageList.size()]);	}