public BundleDescription createBundleDescription(BundleDescription original) { BundleDescriptionImpl bundle = new BundleDescriptionImpl(); bundle.setBundleId(original.getBundleId()); bundle.setSymbolicName(original.getSymbolicName()); bundle.setVersion(original.getVersion()); bundle.setLocation(original.getLocation()); BundleSpecification[] originalRequired = original.getRequiredBundles(); BundleSpecification[] newRequired = new BundleSpecification[originalRequired.length]; for (int i = 0; i < newRequired.length; i++) newRequired[i] = createBundleSpecification(originalRequired[i]); bundle.setRequiredBundles(newRequired); ExportPackageDescription[] originalExports = original.getExportPackages(); ExportPackageDescription[] newExports = new ExportPackageDescription[originalExports.length]; for (int i = 0; i < newExports.length; i++) newExports[i] = createExportPackageDescription(originalExports[i]); bundle.setExportPackages(newExports); ImportPackageSpecification[] originalImports = original.getImportPackages(); ImportPackageSpecification[] newImports = new ImportPackageSpecification[originalImports.length]; for (int i = 0; i < newImports.length; i++) newImports[i] = createImportPackageSpecification(originalImports[i]); bundle.setImportPackages(newImports); if (original.getHost() != null) bundle.setHost(createHostSpecification(original.getHost())); bundle.setSingleton(original.isSingleton()); return bundle;
public BundleDescription createBundleDescription(Dictionary manifest, String location, long id) throws BundleException { BundleDescriptionImpl result = (BundleDescriptionImpl) StateBuilder.createBundleDescription(manifest, location); result.setBundleId(id); return result;
	public BundleDescription createBundleDescription(BundleDescription original) {		BundleDescriptionImpl bundle = new BundleDescriptionImpl();		bundle.setBundleId(original.getBundleId());		bundle.setSymbolicName(original.getSymbolicName());		bundle.setVersion(original.getVersion());		bundle.setLocation(original.getLocation());		BundleSpecification[] originalRequired = original.getRequiredBundles();		BundleSpecification[] newRequired = new BundleSpecification[originalRequired.length];		for (int i = 0; i < newRequired.length; i++)			newRequired[i] = createBundleSpecification(originalRequired[i]);		bundle.setRequiredBundles(newRequired);		ExportPackageDescription[] originalExports = original.getExportPackages();		ExportPackageDescription[] newExports = new ExportPackageDescription[originalExports.length];		for (int i = 0; i < newExports.length; i++)			newExports[i] = createExportPackageDescription(originalExports[i]);		bundle.setExportPackages(newExports);		ImportPackageSpecification[] originalImports = original.getImportPackages();		ImportPackageSpecification[] newImports = new ImportPackageSpecification[originalImports.length];		for (int i = 0; i < newImports.length; i++)			newImports[i] = createImportPackageSpecification(originalImports[i]);		bundle.setImportPackages(newImports);		if (original.getHost() != null)			bundle.setHost(createHostSpecification(original.getHost()));		bundle.setSingleton(original.isSingleton());		return bundle;	}