Package org.apache.ivy.osgi.core
Class ManifestParser
java.lang.Object
org.apache.ivy.osgi.core.ManifestParser
Provides an OSGi manifest parser.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
formatLines
(String manifest) Ensure that the lines are not longer than 72 characters, so it can be parsed by theManifest
classprivate static void
parseCapability
(BundleInfo bundleInfo, Attributes mainAttributes, String headerName, String type) static BundleInfo
parseJarManifest
(InputStream jarStream) static BundleInfo
parseManifest
(File manifestFile) static BundleInfo
parseManifest
(InputStream manifestStream) static BundleInfo
parseManifest
(String manifest) static BundleInfo
parseManifest
(Manifest manifest) private static void
parseRequirement
(BundleInfo bundleInfo, Attributes mainAttributes, String headerName, String type, String versionAttr) private static Version
private static VersionRange
-
Field Details
-
EXPORT_PACKAGE
- See Also:
-
IMPORT_PACKAGE
- See Also:
-
EXPORT_SERVICE
- See Also:
-
IMPORT_SERVICE
- See Also:
-
REQUIRE_BUNDLE
- See Also:
-
BUNDLE_VERSION
- See Also:
-
BUNDLE_NAME
- See Also:
-
BUNDLE_DESCRIPTION
- See Also:
-
BUNDLE_SYMBOLIC_NAME
- See Also:
-
BUNDLE_MANIFEST_VERSION
- See Also:
-
BUNDLE_REQUIRED_EXECUTION_ENVIRONMENT
- See Also:
-
BUNDLE_CLASSPATH
- See Also:
-
ECLIPSE_SOURCE_BUNDLE
- See Also:
-
ATTR_RESOLUTION
- See Also:
-
ATTR_VERSION
- See Also:
-
ATTR_BUNDLE_VERSION
- See Also:
-
ATTR_USE
- See Also:
-
-
Constructor Details
-
ManifestParser
public ManifestParser()
-
-
Method Details
-
parseJarManifest
- Throws:
IOException
ParseException
-
parseManifest
- Throws:
IOException
ParseException
-
parseManifest
- Throws:
IOException
ParseException
-
parseManifest
public static BundleInfo parseManifest(InputStream manifestStream) throws IOException, ParseException - Throws:
IOException
ParseException
-
parseManifest
- Throws:
ParseException
-
parseRequirement
private static void parseRequirement(BundleInfo bundleInfo, Attributes mainAttributes, String headerName, String type, String versionAttr) throws ParseException - Throws:
ParseException
-
parseCapability
private static void parseCapability(BundleInfo bundleInfo, Attributes mainAttributes, String headerName, String type) throws ParseException - Throws:
ParseException
-
versionRangeOf
- Throws:
ParseException
-
versionOf
-
formatLines
Ensure that the lines are not longer than 72 characters, so it can be parsed by theManifest
class- Parameters:
manifest
- ditto- Returns:
- String
-