Code example for Attributes

Methods: putValue

0
   */ 
  public Manifest getManifest() {
    Manifest manifest = new Manifest();
    Attributes attributes = manifest.getMainAttributes();
 
    attributes.putValue("Manifest-Version", "1.0");
    attributes.putValue("Bundle-ManifestVersion", "2");
 
    attributes.putValue("Bundle-SymbolicName", this._bundleSymbolicName);
    attributes.putValue("Bundle-Version", this._bundleVersion);
 
    if (Utilities.hasText(this._bundleName)) {
      attributes.putValue("Bundle-Name", this._bundleName);
    } 
 
    if (Utilities.hasText(this._importPackage)) {
      attributes.putValue("Import-Package", this._importPackage);
    } 
 
    if (Utilities.hasText(this._exportPackage)) {
      attributes.putValue("Export-Package", this._exportPackage);
    } 
 
    if (Utilities.hasText(this._fragmentHost)) {
      attributes.putValue("Fragment-Host", this._fragmentHost);
    } 
 
    if (Utilities.hasText(this._classpath)) {
      attributes.putValue("Bundle-ClassPath", this._classpath);
    } 
    return manifest;
  } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE