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

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.BaseImported
              extended by com.springsource.util.osgi.manifest.internal.StandardImportedPackage
All Implemented Interfaces:
Imported, ImportedPackage, Parameterised, Parseable

public class StandardImportedPackage
extends BaseImported
implements ImportedPackage

Concurrent Semantics
Not thread-safe.


Field Summary
 
Fields inherited from class com.springsource.util.osgi.manifest.internal.BaseParameterised
name
 
Constructor Summary
StandardImportedPackage(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 name of the package that is imported, never null.
(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 imported package.
 
Methods inherited from class com.springsource.util.osgi.manifest.internal.BaseImported
getResolution, getVersion, setResolution, setVersion
 
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.Imported
getResolution, getVersion, setResolution, setVersion
 
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

StandardImportedPackage

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

parse

HeaderDeclaration parse(HeaderParser parser,
                        java.lang.String parseString)

Specified by:
parse in class BaseParameterised

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 ImportedPackage
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 ImportedPackage
Returns:
The value of the bundle-version attribute.

getPackageName

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

Specified by:
getPackageName in interface ImportedPackage
Returns:
the name of the imported package

setBundleSymbolicName

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

Specified by:
setBundleSymbolicName in interface ImportedPackage
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 ImportedPackage
Parameters:
versionRange - the value of the bundle-version attribute.

setPackageName

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

Specified by:
setPackageName in interface ImportedPackage
Parameters:
packageName - the imported package's name