public class PackageInfo extends Object implements Comparable<PackageInfo>
| Constructor and Description |
|---|
PackageInfo(String name,
String version,
boolean optional)
Constructor for a package info
|
PackageInfo(String name,
String version,
boolean optional,
Set<String> uses)
Constructor for a package info
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(PackageInfo o) |
boolean |
equals(Object obj) |
String |
getName()
The package name
|
org.osgi.framework.Version |
getPackageVersion()
Return the package version as a
Version object. |
org.osgi.framework.VersionRange |
getPackageVersionRange()
Return the version as a version range
If this package info is used to return info about an export
package statement, don't use this method but rather use
getPackageVersion() |
Set<String> |
getUses()
Return the uses constraints
|
String |
getVersion()
Return the package version
|
int |
hashCode() |
boolean |
isOptional()
Return whether the package is optional
|
String |
toString() |
public PackageInfo(String name, String version, boolean optional)
name - package nameversion - package versionoptional - is the package optionalpublic String getName()
public String getVersion()
public boolean isOptional()
true if it is optionalpublic org.osgi.framework.Version getPackageVersion()
Version object.
If this package info is used to return info about an import
package statement, don't use this method but rather use
getPackageVersionRange()nullIllegalArgumentException - If the version is not well formed.public org.osgi.framework.VersionRange getPackageVersionRange()
getPackageVersion()nullIllegalArgumentException - If the range is not well formed.public Set<String> getUses()
public int compareTo(PackageInfo o)
compareTo in interface Comparable<PackageInfo>Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.