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

java.lang.Object
  extended by com.springsource.util.osgi.manifest.internal.BaseParameterised
      extended by com.springsource.util.osgi.manifest.internal.BaseCompoundHeaderEntry
          extended by com.springsource.util.osgi.manifest.internal.StandardExportedPackage
All Implemented Interfaces:
ExportedPackage, Parameterised, Parseable

public class StandardExportedPackage
extends BaseCompoundHeaderEntry
implements ExportedPackage

Concurrent Semantics
Not thread-safe.


Field Summary
 
Fields inherited from class com.springsource.util.osgi.manifest.internal.BaseParameterised
name
 
Constructor Summary
StandardExportedPackage(HeaderParser parser, java.lang.String name)
           
 
Method Summary
 java.util.List<java.lang.String> getExclude()
          Returns a list of the class names specified in the export's exclude directive.
 java.util.List<java.lang.String> getInclude()
          Returns a list of the class names specified in the export's include directive.
 java.util.List<java.lang.String> getMandatory()
          Returns a list of the attribute names specified in the export's mandatory directive.
 java.lang.String getPackageName()
          Returns the name of the exported package, never null.
 java.util.List<java.lang.String> getUses()
          Returns a List of the package names specified in the export's uses directive.
 org.osgi.framework.Version getVersion()
          Returns the version of the exported package.
(package private)  HeaderDeclaration parse(HeaderParser parser, java.lang.String parseString)
           
 void setPackageName(java.lang.String packageName)
          Sets the name of the exported package.
 void setVersion(org.osgi.framework.Version version)
          Sets the version of the exported package
 
Methods inherited from class com.springsource.util.osgi.manifest.internal.BaseParameterised
equals, getAttributes, getDirectives, hashCode, resetFromParseString, toParseString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.springsource.util.osgi.manifest.Parameterised
getAttributes, getDirectives
 
Methods inherited from interface com.springsource.util.osgi.manifest.Parseable
resetFromParseString, toParseString
 

Constructor Detail

StandardExportedPackage

StandardExportedPackage(HeaderParser parser,
                        java.lang.String name)
Method Detail

parse

HeaderDeclaration parse(HeaderParser parser,
                        java.lang.String parseString)
Specified by:
parse in class BaseParameterised

getExclude

public java.util.List<java.lang.String> getExclude()
Returns a list of the class names specified in the export's exclude directive. Returns an empty list if the export has no exclude directive.

Specified by:
getExclude in interface ExportedPackage
Returns:
the list of exclusions

getInclude

public java.util.List<java.lang.String> getInclude()
Returns a list of the class names specified in the export's include directive. Returns an empty list if the export has no include directive.

Specified by:
getInclude in interface ExportedPackage
Returns:
the list of inclusions

getMandatory

public java.util.List<java.lang.String> getMandatory()
Returns a list of the attribute names specified in the export's mandatory directive.

Specified by:
getMandatory in interface ExportedPackage
Returns:
the names of the mandatory attributes. Returns an empty list if the export has no mandatory directive.

getPackageName

public java.lang.String getPackageName()
Returns the name of the exported package, never null.

Specified by:
getPackageName in interface ExportedPackage
Returns:
the package name

getUses

public java.util.List<java.lang.String> getUses()
Returns a List of the package names specified in the export's uses directive. Returns an empty list if the export has no uses directive.

Specified by:
getUses in interface ExportedPackage
Returns:
the names of the used packages.

getVersion

public org.osgi.framework.Version getVersion()
Returns the version of the exported package.

Specified by:
getVersion in interface ExportedPackage
Returns:
the version of the exported package. Returns the default version (0) if the export has no version.

setVersion

public void setVersion(org.osgi.framework.Version version)
Sets the version of the exported package

Specified by:
setVersion in interface ExportedPackage
Parameters:
version - The exported package's version

setPackageName

public void setPackageName(java.lang.String packageName)
Sets the name of the exported package.

Specified by:
setPackageName in interface ExportedPackage
Parameters:
packageName - the package name