Class ManifestParser
- java.lang.Object
-
- org.apache.felix.framework.util.manifestparser.ManifestParser
-
public class ManifestParser extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ManifestParser(Logger logger, java.util.Map<java.lang.String,java.lang.Object> configMap, BundleRevision owner, java.util.Map<java.lang.String,java.lang.Object> headerMap)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.List<BundleCapability>aliasSymbolicName(java.util.List<BundleCapability> caps, BundleRevision owner)java.lang.StringgetActivationExcludeDirective()java.lang.StringgetActivationIncludeDirective()intgetActivationPolicy()VersiongetBundleVersion()java.util.List<BundleCapability>getCapabilities()java.util.List<NativeLibrary>getLibraries()This method returns the selected native library metadata from the manifest.java.lang.StringgetManifestVersion()java.util.List<BundleRequirement>getRequirements()java.lang.StringgetSymbolicName()booleanisExtension()static voidmain(java.lang.String[] headers)static java.util.List<java.lang.String>parseDelimitedString(java.lang.String value, java.lang.String delim)static java.util.List<java.lang.String>parseDelimitedString(java.lang.String value, java.lang.String delim, boolean trim)Parses delimited string and returns an array containing the tokens.static java.util.List<BundleRequirement>parseDynamicImportHeader(Logger logger, BundleRevision owner, java.lang.String header)static java.lang.StringparseExtensionBundleHeader(java.lang.String header)
-
-
-
Constructor Detail
-
ManifestParser
public ManifestParser(Logger logger, java.util.Map<java.lang.String,java.lang.Object> configMap, BundleRevision owner, java.util.Map<java.lang.String,java.lang.Object> headerMap) throws BundleException
- Throws:
BundleException
-
-
Method Detail
-
parseDynamicImportHeader
public static java.util.List<BundleRequirement> parseDynamicImportHeader(Logger logger, BundleRevision owner, java.lang.String header) throws BundleException
- Throws:
BundleException
-
getManifestVersion
public java.lang.String getManifestVersion()
-
getActivationPolicy
public int getActivationPolicy()
-
getActivationIncludeDirective
public java.lang.String getActivationIncludeDirective()
-
getActivationExcludeDirective
public java.lang.String getActivationExcludeDirective()
-
isExtension
public boolean isExtension()
-
getSymbolicName
public java.lang.String getSymbolicName()
-
getBundleVersion
public Version getBundleVersion()
-
getCapabilities
public java.util.List<BundleCapability> getCapabilities()
-
getRequirements
public java.util.List<BundleRequirement> getRequirements()
-
getLibraries
public java.util.List<NativeLibrary> getLibraries()
This method returns the selected native library metadata from the manifest. The information is not the raw metadata from the manifest, but is the native library clause selected according to the OSGi native library clause selection policy. The metadata returned by this method will be attached directly to a module and used for finding its native libraries at run time. To inspect the raw native library metadata refer to getLibraryClauses().
This method returns one of three values:
- null - if the are no native libraries for this module; this may also indicate the native libraries are optional and did not match the current platform.
- Zero-length NativeLibrary array - if no matching native library clause was found; this bundle should not resolve.
- Nonzero-length NativeLibrary array - the native libraries associated with the matching native library clause.
- Returns:
- null if there are no native libraries, a zero-length array if no libraries matched, or an array of selected libraries.
-
parseExtensionBundleHeader
public static java.lang.String parseExtensionBundleHeader(java.lang.String header) throws BundleException- Throws:
BundleException
-
main
public static void main(java.lang.String[] headers)
-
parseDelimitedString
public static java.util.List<java.lang.String> parseDelimitedString(java.lang.String value, java.lang.String delim)
-
parseDelimitedString
public static java.util.List<java.lang.String> parseDelimitedString(java.lang.String value, java.lang.String delim, boolean trim)Parses delimited string and returns an array containing the tokens. This parser obeys quotes, so the delimiter character will be ignored if it is inside of a quote. This method assumes that the quote character is not included in the set of delimiter characters.- Parameters:
value- the delimited string to parse.delim- the characters delimiting the tokens.- Returns:
- a list of string or an empty list if there are none.
-
aliasSymbolicName
public static java.util.List<BundleCapability> aliasSymbolicName(java.util.List<BundleCapability> caps, BundleRevision owner)
-
-