|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.springsource.bundlor.internal.transformer.BundleManifestMerger
final class BundleManifestMerger
Handles merging of two BundleManifest
instances, with one overriding the other. Package headers such as
Import-Package
and Export-Package
are merged at a package name level.
Field Summary | |
---|---|
private static java.lang.String |
ATTR_VERSION
|
private static java.lang.String |
DIRECTIVE_EXCLUDE
|
private static java.lang.String |
DIRECTIVE_INCLUDE
|
private static java.lang.String |
DIRECTIVE_MANDATORY
|
private static java.lang.String |
DIRECTIVE_RESOLUTION
|
private static java.lang.String |
DIRECTIVE_USES
|
private static java.lang.String |
RESOLUTION_OPTIONAL
|
Constructor Summary | |
---|---|
BundleManifestMerger()
|
Method Summary | |
---|---|
private void |
addCommaSeparated(java.util.Collection<java.lang.String> target,
java.lang.String value)
Parses value as a comma-separated list and adds the resultant elements to target . |
com.springsource.util.osgi.manifest.BundleManifest |
combineBundleManifests(com.springsource.util.osgi.manifest.BundleManifest base,
com.springsource.util.osgi.manifest.BundleManifest generated)
|
private java.util.List<com.springsource.util.osgi.manifest.ImportedPackage> |
combineImports(com.springsource.util.osgi.manifest.BundleManifest base,
com.springsource.util.osgi.manifest.BundleManifest generated)
|
private java.util.Map<java.lang.String,java.lang.String> |
createDirectives(com.springsource.util.osgi.manifest.ExportedPackage packageExport)
Creates the directives for the supplied ExportedPackage . |
private java.util.Map<java.lang.String,java.lang.String> |
createDirectives(com.springsource.util.osgi.manifest.ImportedPackage importedPackage)
Creates the directives for the supplied ImportedPackage . |
private com.springsource.util.osgi.manifest.ImportedPackage |
getImport(java.lang.String packageName,
java.util.List<com.springsource.util.osgi.manifest.ImportedPackage> imports)
|
private PackageDeclarationMap |
mapExports(com.springsource.util.osgi.manifest.BundleManifest manifest)
Maps the Export-Package header for the supplied manifest into a PackageDeclarationMap . |
private PackageDeclarationMap |
mapImports(com.springsource.util.osgi.manifest.BundleManifest manifest)
Maps the Import-Package header for the supplied manifest into a PackageDeclarationMap . |
com.springsource.util.osgi.manifest.BundleManifest |
mergeBundleManifests(com.springsource.util.osgi.manifest.BundleManifest base,
com.springsource.util.osgi.manifest.BundleManifest override)
Merges base and override together, with override taking precendence over
base . |
private java.util.List<com.springsource.util.osgi.manifest.ExportedPackage> |
mergeExports(com.springsource.util.osgi.manifest.BundleManifest base,
com.springsource.util.osgi.manifest.BundleManifest override,
org.osgi.framework.Version bundleVersion)
Merges the Export-Package headers for the supplied manifests. |
private java.util.List<com.springsource.util.osgi.manifest.ImportedPackage> |
mergeImports(com.springsource.util.osgi.manifest.BundleManifest base,
com.springsource.util.osgi.manifest.BundleManifest override)
Merges the Import-Package headers for the supplied manifests. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String ATTR_VERSION
private static final java.lang.String DIRECTIVE_EXCLUDE
private static final java.lang.String DIRECTIVE_INCLUDE
private static final java.lang.String DIRECTIVE_MANDATORY
private static final java.lang.String DIRECTIVE_USES
private static final java.lang.String DIRECTIVE_RESOLUTION
private static final java.lang.String RESOLUTION_OPTIONAL
Constructor Detail |
---|
BundleManifestMerger()
Method Detail |
---|
public com.springsource.util.osgi.manifest.BundleManifest mergeBundleManifests(com.springsource.util.osgi.manifest.BundleManifest base, com.springsource.util.osgi.manifest.BundleManifest override)
base
and override
together, with override
taking precendence over
base
.
base
- the base BundleManifest
.override
- the overriding BundleManifest
.warnings
- the List
to gather Warnings
in.
BundleManifest
.public com.springsource.util.osgi.manifest.BundleManifest combineBundleManifests(com.springsource.util.osgi.manifest.BundleManifest base, com.springsource.util.osgi.manifest.BundleManifest generated)
private java.util.List<com.springsource.util.osgi.manifest.ExportedPackage> mergeExports(com.springsource.util.osgi.manifest.BundleManifest base, com.springsource.util.osgi.manifest.BundleManifest override, org.osgi.framework.Version bundleVersion)
Export-Package
headers for the supplied manifests.
private java.util.List<com.springsource.util.osgi.manifest.ImportedPackage> mergeImports(com.springsource.util.osgi.manifest.BundleManifest base, com.springsource.util.osgi.manifest.BundleManifest override)
Import-Package
headers for the supplied manifests.
private java.util.List<com.springsource.util.osgi.manifest.ImportedPackage> combineImports(com.springsource.util.osgi.manifest.BundleManifest base, com.springsource.util.osgi.manifest.BundleManifest generated)
private com.springsource.util.osgi.manifest.ImportedPackage getImport(java.lang.String packageName, java.util.List<com.springsource.util.osgi.manifest.ImportedPackage> imports)
private PackageDeclarationMap mapImports(com.springsource.util.osgi.manifest.BundleManifest manifest)
Import-Package
header for the supplied manifest into a PackageDeclarationMap
.
private PackageDeclarationMap mapExports(com.springsource.util.osgi.manifest.BundleManifest manifest)
Export-Package
header for the supplied manifest into a PackageDeclarationMap
.
private java.util.Map<java.lang.String,java.lang.String> createDirectives(com.springsource.util.osgi.manifest.ExportedPackage packageExport)
ExportedPackage
.
private java.util.Map<java.lang.String,java.lang.String> createDirectives(com.springsource.util.osgi.manifest.ImportedPackage importedPackage)
ImportedPackage
.
private void addCommaSeparated(java.util.Collection<java.lang.String> target, java.lang.String value)
value
as a comma-separated list and adds the resultant elements to target
.
target
- the target Collection
.value
- the String
to parse.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |