com.springsource.bundlor.support.contributors
Class IgnoredExistingHeadersManifestModifier

java.lang.Object
  extended by com.springsource.bundlor.support.contributors.IgnoredExistingHeadersManifestModifier
All Implemented Interfaces:
ManifestModifier, ManifestReader, TemplateHeaderReader

public final class IgnoredExistingHeadersManifestModifier
extends java.lang.Object
implements ManifestModifier, ManifestReader, TemplateHeaderReader

An analyzer that removes existing headers from the input manifest before it is used to build the bundle manifest.

Concurrent Semantics
Threadsafe

Author:
Ben Hale

Field Summary
private static java.lang.String ATTR_IGNORED_EXISTING_HEADERS
           
private  java.util.List<java.lang.String> ignoredExistingHeaders
           
private  java.lang.Object ignoredExistingHeadersMonitor
           
 
Constructor Summary
IgnoredExistingHeadersManifestModifier()
           
 
Method Summary
 java.util.List<java.lang.String> getTemplateOnlyHeaderNames()
          Gets the list of header names required by this reader.
 void modify(com.springsource.util.parser.manifest.ManifestContents manifest)
          Modify the JAR manifest before it is used to create the bundle manifest
private  java.util.List<com.springsource.util.osgi.manifest.parse.HeaderDeclaration> parseTemplate(java.lang.String template)
           
 void readJarManifest(com.springsource.util.parser.manifest.ManifestContents manifest)
          Read the source JAR's manifest before it is used to create the bundle manifest
 void readManifestTemplate(com.springsource.util.parser.manifest.ManifestContents manifestTemplate)
          Read the manifest template before it is used to create the bundle manifest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_IGNORED_EXISTING_HEADERS

private static final java.lang.String ATTR_IGNORED_EXISTING_HEADERS
See Also:
Constant Field Values

ignoredExistingHeaders

private final java.util.List<java.lang.String> ignoredExistingHeaders

ignoredExistingHeadersMonitor

private final java.lang.Object ignoredExistingHeadersMonitor
Constructor Detail

IgnoredExistingHeadersManifestModifier

public IgnoredExistingHeadersManifestModifier()
Method Detail

readJarManifest

public void readJarManifest(com.springsource.util.parser.manifest.ManifestContents manifest)
Read the source JAR's manifest before it is used to create the bundle manifest

Specified by:
readJarManifest in interface ManifestReader
Parameters:
manifest - the JAR manifest

readManifestTemplate

public void readManifestTemplate(com.springsource.util.parser.manifest.ManifestContents manifestTemplate)
Read the manifest template before it is used to create the bundle manifest

Specified by:
readManifestTemplate in interface ManifestReader
Parameters:
manifestTemplate - the manifest template

modify

public void modify(com.springsource.util.parser.manifest.ManifestContents manifest)
Modify the JAR manifest before it is used to create the bundle manifest

Specified by:
modify in interface ManifestModifier
Parameters:
manifest - the manifest to modify

getTemplateOnlyHeaderNames

public java.util.List<java.lang.String> getTemplateOnlyHeaderNames()
Gets the list of header names required by this reader.

Specified by:
getTemplateOnlyHeaderNames in interface TemplateHeaderReader
Returns:
The list of header names.

parseTemplate

private java.util.List<com.springsource.util.osgi.manifest.parse.HeaderDeclaration> parseTemplate(java.lang.String template)