|
Knopflerfish OSGi 2.4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ungoverned.osgi.service.bundlerepository.PackageDeclaration
public class PackageDeclaration
This is a simple class to encapsulate a package declaration for bundle imports and exports for the bundle repository.
Field Summary | |
---|---|
static java.lang.String |
PACKAGE_ATTR
|
static java.lang.String |
VERSION_ATTR
|
Constructor Summary | |
---|---|
PackageDeclaration(PackageDeclaration pkg)
Construct a copy of a package declaration. |
|
PackageDeclaration(java.lang.String name,
int[] version)
Construct a package declaration. |
|
PackageDeclaration(java.lang.String name,
java.lang.String versionString)
Construct a package declaration. |
Method Summary | |
---|---|
int |
compareVersion(PackageDeclaration pkg)
Compares two package declarations. |
boolean |
doesSatisfy(PackageDeclaration pkg)
Determines if the current package declaration satisfies the supplied package declaration. |
java.lang.String |
getName()
Gets the name of the package. |
java.lang.String |
getVersion()
Gets the version of the package represented as a string. |
java.lang.String |
toString()
Gets the string representation of the package declaration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PACKAGE_ATTR
public static final java.lang.String VERSION_ATTR
Constructor Detail |
---|
public PackageDeclaration(java.lang.String name, java.lang.String versionString)
name
- the name of the package.versionString
- the package version as a string.public PackageDeclaration(java.lang.String name, int[] version)
name
- the name of the package.version
- the package version as an integer triplet.public PackageDeclaration(PackageDeclaration pkg)
pkg
- the package declaration to copy.Method Detail |
---|
public java.lang.String getName()
public java.lang.String getVersion()
public int compareVersion(PackageDeclaration pkg)
pkg
- the package declaration used for comparison.
java.lang.IllegalArgumentException
- if the package declarations are
not for the same package.public boolean doesSatisfy(PackageDeclaration pkg)
pkg
- the package to be checked.
public java.lang.String toString()
toString
in class java.lang.Object
|
Knopflerfish OSGi 2.4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |