getPackages(requiredBundles[i], bundle.getSymbolicName(), importList, packageList, new ArrayList(), strict);
getPackages(requiredBundles[i], bundle.getSymbolicName(), importList, packageList, visited, strict);
	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.		ExportPackageDescription[] resolvedImports = bundle.getResolvedImports();		for (int i = 0; i < resolvedImports.length; i++) {			packageList.add(resolvedImports[i]);			importList.add(resolvedImports[i].getName()); // besure to add to direct import list		}		// now find all the packages that are visible from required bundles		BundleDescription[] requiredBundles = bundle.getResolvedRequires();		for (int i = 0; i < requiredBundles.length; i++)			getPackages(requiredBundles[i], bundle.getSymbolicName(), importList, packageList, new ArrayList(), strict);		return (ExportPackageDescription[]) packageList.toArray(new ExportPackageDescription[packageList.size()]);	}