com.springsource.util.osgi.manifest.internal
Class StandardRequireBundle

java.lang.Object
  extended by com.springsource.util.osgi.manifest.internal.CompoundParseable<RequiredBundle>
      extended by com.springsource.util.osgi.manifest.internal.StandardRequireBundle
All Implemented Interfaces:
Parseable, RequireBundle

public class StandardRequireBundle
extends CompoundParseable<RequiredBundle>
implements RequireBundle

Concurrent Semantics
Not thread-safe.


Field Summary
 
Fields inherited from class com.springsource.util.osgi.manifest.internal.CompoundParseable
components, parser
 
Constructor Summary
StandardRequireBundle(HeaderParser parser)
           
 
Method Summary
 RequiredBundle addRequiredBundle(java.lang.String requiredBundle)
          Adds a required bundle with the supplied bundle symbolic name to this Require-Bundle header.
 java.util.List<RequiredBundle> getRequiredBundles()
          Returns a List of the bundles that are required.
(package private)  RequiredBundle newEntry(java.lang.String name)
          
(package private)  java.util.List<HeaderDeclaration> parse(java.lang.String parseString)
          
 
Methods inherited from class com.springsource.util.osgi.manifest.internal.CompoundParseable
add, resetFromParseString, toParseString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.springsource.util.osgi.manifest.Parseable
resetFromParseString, toParseString
 

Constructor Detail

StandardRequireBundle

StandardRequireBundle(HeaderParser parser)
Method Detail

addRequiredBundle

public RequiredBundle addRequiredBundle(java.lang.String requiredBundle)
Adds a required bundle with the supplied bundle symbolic name to this Require-Bundle header.

If there is already a required bundle with the given symbolic name, a duplicate is added and the resultant manifest will not conform to the OSGi specification. This behaviour may change: see issue DMS-548.

Specified by:
addRequiredBundle in interface RequireBundle
Parameters:
requiredBundle - the symbolic name of the required bundle
Returns:
the newly-created RequiredBundle.

getRequiredBundles

public java.util.List<RequiredBundle> getRequiredBundles()
Returns a List of the bundles that are required. Returns an empty List if no bundles are required.

Specified by:
getRequiredBundles in interface RequireBundle
Returns:
the required bundles

parse

java.util.List<HeaderDeclaration> parse(java.lang.String parseString)

Specified by:
parse in class CompoundParseable<RequiredBundle>

newEntry

RequiredBundle newEntry(java.lang.String name)

Specified by:
newEntry in class CompoundParseable<RequiredBundle>