|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BundleTransformer
Main entry point for manifest generation and transformation, detecting class path dependencies and automatically inserting imports and exports. Enables creation of manifests and also transformation of JAR files.
Clients provide a template manifest that is used to determine through pattern matching and various other directives which headers to include from the original manifest (if there is one), and what directives to add to new manifest. Three basic operations are provided:merge
, transform
(for which the output is a JAR file)
and generateManifest
(for which the output is a manifest). The difference between a merge and a
transform is related only to directives on imports and exports (like resolution:=optional
): a merge
always keeps existing directives that do not conflict with the template; a transform removes existing directives and
replaces them in imports and exports that are automatically generated.
Concurrent Semantics
Method Summary | |
---|---|
com.springsource.util.osgi.manifest.BundleManifest |
generateManifest(com.springsource.util.parser.manifest.ManifestContents existingManifest,
com.springsource.util.parser.manifest.ManifestContents manifestTemplate,
java.lang.String... classPaths)
Generates the BundleManifest for classes on the file system using the supplied manifest template |
com.springsource.util.osgi.manifest.BundleManifest |
generateManifest(java.lang.String inputPath,
com.springsource.util.parser.manifest.ManifestContents manifestTemplate)
Generates the BundleManifest for a JAR using the supplied manifest template |
Result |
merge(java.lang.String inputPath,
com.springsource.util.parser.manifest.ManifestContents templateManifest,
java.lang.String outputPath)
Transforms a JAR, merging its existing manifest with the manifest generated using the supplied manifest template |
com.springsource.util.osgi.manifest.BundleManifest |
mergeManifest(java.lang.String inputPath,
com.springsource.util.parser.manifest.ManifestContents manifestTemplate)
Generates the BundleManifest for a JAR, merging its existing manifest with the manifest generated using
the supplied manifest template |
Result |
transform(java.lang.String inputPath,
com.springsource.util.parser.manifest.ManifestContents templateManifest,
java.lang.String outputPath)
Transforms a JAR, adding in the manifest generated using the supplied manifest template |
Method Detail |
---|
com.springsource.util.osgi.manifest.BundleManifest generateManifest(java.lang.String inputPath, com.springsource.util.parser.manifest.ManifestContents manifestTemplate)
BundleManifest
for a JAR using the supplied manifest template
inputPath
- the path to the input JARmanifestTemplate
- the manifest template
BundleManifest
com.springsource.util.osgi.manifest.BundleManifest generateManifest(com.springsource.util.parser.manifest.ManifestContents existingManifest, com.springsource.util.parser.manifest.ManifestContents manifestTemplate, java.lang.String... classPaths)
BundleManifest
for classes on the file system using the supplied manifest template
existingManifest
- the existing manifestmanifestTemplate
- the manifest templateclassPaths
- the paths to all class folders to scan for inclusion in scanning
BundleManifest
com.springsource.util.osgi.manifest.BundleManifest mergeManifest(java.lang.String inputPath, com.springsource.util.parser.manifest.ManifestContents manifestTemplate)
BundleManifest
for a JAR, merging its existing manifest with the manifest generated using
the supplied manifest template
inputPath
- the path to the input JARmanifestTemplate
- the manifest template
BundleManifest
Result transform(java.lang.String inputPath, com.springsource.util.parser.manifest.ManifestContents templateManifest, java.lang.String outputPath)
inputPath
- the path to the input JARtemplateManifest
- the manifest templateoutputPath
- the path to which the transformed JAR should be written
Result merge(java.lang.String inputPath, com.springsource.util.parser.manifest.ManifestContents templateManifest, java.lang.String outputPath)
inputPath
- the path to the input JARtemplateManifest
- the manifest templateoutputPath
- the path to which the transformed JAR should be written
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |