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

java.lang.Object
  extended by com.springsource.util.osgi.manifest.internal.CompoundParseable<ImportedPackage>
      extended by com.springsource.util.osgi.manifest.internal.StandardImportPackage
All Implemented Interfaces:
ImportPackage, Parseable

public class StandardImportPackage
extends CompoundParseable<ImportedPackage>
implements ImportPackage

Concurrent Semantics
Thread-safe.


Field Summary
 
Fields inherited from class com.springsource.util.osgi.manifest.internal.CompoundParseable
components, parser
 
Constructor Summary
StandardImportPackage(HeaderParser parser)
           
 
Method Summary
 ImportedPackage addImportedPackage(java.lang.String importedPackage)
          Adds an import of the package with the supplied name to this Import-Package header.
 java.util.List<ImportedPackage> getImportedPackages()
          Returns a List of the packages that are imported.
(package private)  ImportedPackage 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

StandardImportPackage

StandardImportPackage(HeaderParser parser)
Parameters:
parser -
Method Detail

addImportedPackage

public ImportedPackage addImportedPackage(java.lang.String importedPackage)
Adds an import of the package with the supplied name to this Import-Package header.

Specified by:
addImportedPackage in interface ImportPackage
Parameters:
importedPackage - The name of the imported package.
Returns:
the newly-created ImportedPackage.

getImportedPackages

public java.util.List<ImportedPackage> getImportedPackages()
Returns a List of the packages that are imported. Returns an empty List if no packages are imported.

Specified by:
getImportedPackages in interface ImportPackage
Returns:
the imported packages.

parse

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

Specified by:
parse in class CompoundParseable<ImportedPackage>

newEntry

ImportedPackage newEntry(java.lang.String name)

Specified by:
newEntry in class CompoundParseable<ImportedPackage>