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

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.StandardDynamicallyImportedPackage
All Implemented Interfaces:
DynamicallyImportedPackage, Parameterised, Parseable

 class StandardDynamicallyImportedPackage
extends BaseCompoundHeaderEntry
implements DynamicallyImportedPackage

Concurrent Semantics
Not thread-safe.


Field Summary
 
Fields inherited from class com.springsource.util.osgi.manifest.internal.BaseParameterised
name
 
Constructor Summary
StandardDynamicallyImportedPackage(HeaderParser parser, java.lang.String name)
           
 
Method Summary
 java.lang.String getBundleSymbolicName()
          Returns the value of the import's bundle-symbolic-name attribute.
 VersionRange getBundleVersion()
          Returns the value of the import's bundle-version attribute.
 java.lang.String getPackageName()
          Returns the (possibly wildcarded) name of the package in this entry.
 VersionRange getVersion()
          Returns the version range of the import.
(package private)  HeaderDeclaration parse(HeaderParser parser, java.lang.String parseString)
           
 void setBundleSymbolicName(java.lang.String bundleSymbolicName)
          Sets the value of the import's bundle-symbolic-name attribute.
 void setBundleVersion(VersionRange versionRange)
          Sets the value of the import's bundle-version attribute.
 void setPackageName(java.lang.String packageName)
          Sets the name of the package in this entry.
 void setVersion(VersionRange versionRange)
          Sets the version range of the import.
 
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

StandardDynamicallyImportedPackage

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

parse

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

getPackageName

public java.lang.String getPackageName()
Returns the (possibly wildcarded) name of the package in this entry.

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

setPackageName

public void setPackageName(java.lang.String packageName)
Sets the name of the package in this entry.

Specified by:
setPackageName in interface DynamicallyImportedPackage
Parameters:
packageName - the package's name.

getBundleSymbolicName

public java.lang.String getBundleSymbolicName()
Returns the value of the import's bundle-symbolic-name attribute. If no such attribute is specified null is returned.

Specified by:
getBundleSymbolicName in interface DynamicallyImportedPackage
Returns:
The value of the import's bundle-symbolic-name attribute.

getBundleVersion

public VersionRange getBundleVersion()
Returns the value of the import's bundle-version attribute. If no such attribute is specified the default version range of [0, infinity) is returned.

Specified by:
getBundleVersion in interface DynamicallyImportedPackage
Returns:
The value of the bundle-version attribute.

getVersion

public VersionRange getVersion()
Returns the version range of the import. If no version attribute is specified the default range of [0, infinity) is returned.

Specified by:
getVersion in interface DynamicallyImportedPackage
Returns:
the import's version range

setVersion

public void setVersion(VersionRange versionRange)
Sets the version range of the import.

Specified by:
setVersion in interface DynamicallyImportedPackage
Parameters:
versionRange - the import's version range.

setBundleSymbolicName

public void setBundleSymbolicName(java.lang.String bundleSymbolicName)
Sets the value of the import's bundle-symbolic-name attribute.

Specified by:
setBundleSymbolicName in interface DynamicallyImportedPackage
Parameters:
bundleSymbolicName - the value of the bundle-symbolic-name attribute.

setBundleVersion

public void setBundleVersion(VersionRange versionRange)
Sets the value of the import's bundle-version attribute.

Specified by:
setBundleVersion in interface DynamicallyImportedPackage
Parameters:
versionRange - the value of the bundle-version attribute.