1 11 package org.eclipse.pde.internal.core.text.bundle; 12 13 import java.util.Vector ; 14 15 import org.eclipse.osgi.util.ManifestElement; 16 import org.eclipse.pde.internal.core.ibundle.IBundle; 17 18 public class ExportPackageHeader extends BasePackageHeader { 19 20 private static final long serialVersionUID = 1L; 21 22 public ExportPackageHeader(String name, String value, IBundle bundle, String lineDelimiter) { 23 super(name, value, bundle, lineDelimiter); 24 } 25 26 protected PDEManifestElement createElement(ManifestElement element) { 27 return new ExportPackageObject(this, element, getVersionAttribute()); 28 } 29 30 public Vector getPackageNames() { 31 return getElementNames(); 32 } 33 34 public ExportPackageObject getPackage(String packageName) { 35 return (fElementMap == null || packageName == null) ? null : (ExportPackageObject) fElementMap.get(packageName); 36 } 37 38 public ExportPackageObject[] getPackages() { 39 PDEManifestElement[] elements = getElements(); 40 ExportPackageObject[] result = new ExportPackageObject[elements.length]; 41 System.arraycopy(elements, 0, result, 0, elements.length); 42 return result; 43 } 44 45 public ExportPackageObject addPackage(String id) { 46 ExportPackageObject obj = new ExportPackageObject(this, id, null, getVersionAttribute()); 47 addManifestElement(obj); 48 return obj; 49 } 50 51 } 52 | Popular Tags |