org.apache.felix.framework.util.manifestparser
Class ManifestParser

java.lang.Object
  extended by org.apache.felix.framework.util.manifestparser.ManifestParser

public class ManifestParser
extends java.lang.Object


Field Summary
static int CLAUSE_ATTRIBUTES_INDEX
           
static int CLAUSE_DIRECTIVES_INDEX
           
static int CLAUSE_PATHS_INDEX
           
 
Constructor Summary
ManifestParser(Logger logger, java.util.Map configMap, IModule owner, java.util.Map headerMap)
           
 
Method Summary
 java.lang.String getActivationExcludeDirective()
           
 java.lang.String getActivationIncludeDirective()
           
 int getActivationPolicy()
           
 org.osgi.framework.Version getBundleVersion()
           
 ICapability[] getCapabilities()
           
 IRequirement[] getDynamicRequirements()
           
 R4Library[] getLibraries()
           This method returns the selected native library metadata from the manifest.
 R4LibraryClause[] getLibraryClauses()
           
 java.lang.String getManifestVersion()
           
 IRequirement[] getRequirements()
           
 java.lang.String getSymbolicName()
           
 boolean isExtension()
           
static java.lang.String[] parseDelimitedString(java.lang.String value, java.lang.String delim)
          Parses delimited string and returns an array containing the tokens.
static ICapability[] parseExportHeader(IModule owner, java.lang.String header, java.lang.String bsn, org.osgi.framework.Version bv)
           
static R4Directive parseExtensionBundleHeader(java.lang.String header)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLAUSE_PATHS_INDEX

public static final int CLAUSE_PATHS_INDEX
See Also:
Constant Field Values

CLAUSE_DIRECTIVES_INDEX

public static final int CLAUSE_DIRECTIVES_INDEX
See Also:
Constant Field Values

CLAUSE_ATTRIBUTES_INDEX

public static final int CLAUSE_ATTRIBUTES_INDEX
See Also:
Constant Field Values
Constructor Detail

ManifestParser

public ManifestParser(Logger logger,
                      java.util.Map configMap,
                      IModule owner,
                      java.util.Map headerMap)
               throws org.osgi.framework.BundleException
Throws:
org.osgi.framework.BundleException
Method Detail

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 org.osgi.framework.Version getBundleVersion()

getCapabilities

public ICapability[] getCapabilities()

getRequirements

public IRequirement[] getRequirements()

getDynamicRequirements

public IRequirement[] getDynamicRequirements()

getLibraryClauses

public R4LibraryClause[] getLibraryClauses()

getLibraries

public R4Library[] 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:

Returns:
null if there are no native libraries, a zero-length array if no libraries matched, or an array of selected libraries.

parseExportHeader

public static ICapability[] parseExportHeader(IModule owner,
                                              java.lang.String header,
                                              java.lang.String bsn,
                                              org.osgi.framework.Version bv)
                                       throws org.osgi.framework.BundleException
Throws:
org.osgi.framework.BundleException

parseExtensionBundleHeader

public static R4Directive parseExtensionBundleHeader(java.lang.String header)
                                              throws org.osgi.framework.BundleException
Throws:
org.osgi.framework.BundleException

parseDelimitedString

public static java.lang.String[] parseDelimitedString(java.lang.String value,
                                                      java.lang.String delim)
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:
an array of string tokens or null if there were no tokens.


Copyright © 2010. All Rights Reserved.