org.apache.felix.ipojo.parser
Class ManifestMetadataParser

java.lang.Object
  extended by org.apache.felix.ipojo.parser.ManifestMetadataParser

public class ManifestMetadataParser
extends java.lang.Object

Manifest Metadata parser. Read a manifest file and construct metadata

Author:
Felix Project Team

Constructor Summary
ManifestMetadataParser()
           
 
Method Summary
 org.apache.felix.ipojo.metadata.Element[] getComponentsMetadata()
          Get the array of component type metadata.
 java.util.Dictionary[] getInstances()
          Get the array of instance configuration described in the metadata.
 void parse(java.util.Dictionary dict)
          Parse the given dictionary and create the instance managers.
static org.apache.felix.ipojo.metadata.Element parse(java.lang.String metadata)
          Parse the metadata from the string given in argument.
 void parseHeader(java.lang.String header)
          Parse the given header and create the instance managers.
static org.apache.felix.ipojo.metadata.Element parseHeaderMetadata(java.lang.String header)
          Parse the metadata from the given header string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManifestMetadataParser

public ManifestMetadataParser()
Method Detail

getComponentsMetadata

public org.apache.felix.ipojo.metadata.Element[] getComponentsMetadata()
                                                                throws ParseException
Get the array of component type metadata.

Returns:
the component metadata (composite & component).
Throws:
ParseException - when a parsing error occurs

getInstances

public java.util.Dictionary[] getInstances()
                                    throws ParseException
Get the array of instance configuration described in the metadata.

Returns:
the instances list.
Throws:
ParseException - : if the metadata cannot be parsed successfully

parse

public void parse(java.util.Dictionary dict)
           throws ParseException
Parse the given dictionary and create the instance managers.

Parameters:
dict - : the given headers of the manifest file
Throws:
ParseException - : if any error occurs

parseHeader

public void parseHeader(java.lang.String header)
                 throws ParseException
Parse the given header and create the instance managers.

Parameters:
header - : the given header of the manifest file
Throws:
ParseException - : if any error occurs

parse

public static org.apache.felix.ipojo.metadata.Element parse(java.lang.String metadata)
                                                     throws ParseException
Parse the metadata from the string given in argument.

Parameters:
metadata - : the metadata to parse
Returns:
Element : the root element resulting of the parsing
Throws:
ParseException - : if any error occurs

parseHeaderMetadata

public static org.apache.felix.ipojo.metadata.Element parseHeaderMetadata(java.lang.String header)
                                                                   throws ParseException
Parse the metadata from the given header string.

Parameters:
header - : the header to parse
Returns:
Element : the root element resulting of the parsing
Throws:
ParseException - : if any error occurs