|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.sdklib.repository.descriptors.PkgDesc
public abstract class PkgDesc
PkgDesc keeps information on individual SDK packages
(both local or remote packages definitions.)
Packages have different attributes depending on their type.
PkgDesc, use one of the package-specific constructors
provided here.
To query packages capabilities, rely on getType() and the PkgDesc.hasXxx()
methods provided in the base PkgDesc.
| Constructor Summary | |
|---|---|
PkgDesc()
|
|
| Method Summary | |
|---|---|
int |
compareTo(IPkgDesc o)
Compares this descriptor to another one. |
boolean |
equals(java.lang.Object obj)
|
AndroidVersion |
getAndroidVersion()
Returns the package's AndroidVersion or null. |
FullRevision |
getFullRevision()
Returns the package's FullRevision or null. |
MajorRevision |
getMajorRevision()
Returns the package's MajorRevision or null. |
FullRevision |
getMinPlatformToolsRev()
Returns the package's min-platform-tools-rev or null. |
FullRevision |
getMinToolsRev()
Returns the package's min-tools-rev or null. |
java.lang.String |
getPath()
Returns the package's path string or null. |
abstract PkgType |
getType()
Returns the type of the package. |
java.lang.String |
getVendorId()
Returns the package's vendor-id string or null. |
boolean |
hasAndroidVersion()
Indicates whether this package type has a AndroidVersion. |
boolean |
hasFullRevision()
Indicates whether this package type has a FullRevision. |
int |
hashCode()
|
boolean |
hasMajorRevision()
Indicates whether this package type has a MajorRevision. |
boolean |
hasMinPlatformToolsRev()
Indicates whether this package type has a min-platform-tools-rev attribute. |
boolean |
hasMinToolsRev()
Indicates whether this package type has a min-tools-rev attribute. |
boolean |
hasPath()
Indicates whether this package type has a path. |
boolean |
hasVendorId()
Indicates whether this package type has a vendor id. |
protected boolean |
isGenericUpdateFor(IPkgDesc existingDesc)
Computes the most general case of IPkgDesc.isUpdateFor(IPkgDesc). |
static IPkgDesc |
newAddon(AndroidVersion version,
MajorRevision revision,
IAddonDesc targetHashProvider)
Create a new platform add-on descriptor where the target hash isn't determined yet. |
static IPkgDesc |
newAddon(AndroidVersion version,
MajorRevision revision,
java.lang.String addonVendor,
java.lang.String addonName)
Create a new add-on package descriptor. |
static IPkgDesc |
newBuildTool(FullRevision revision)
Create a new build-tool package descriptor. |
static IPkgDesc |
newDoc(AndroidVersion version,
MajorRevision revision)
Create a new doc package descriptor. |
static IPkgDescExtra |
newExtra(java.lang.String vendorId,
java.lang.String path,
java.lang.String[] oldPaths,
NoPreviewRevision revision)
Create a new extra package descriptor. |
static IPkgDesc |
newPlatform(AndroidVersion version,
MajorRevision revision,
FullRevision minToolsRev)
Create a new platform package descriptor. |
static IPkgDesc |
newPlatformTool(FullRevision revision)
Create a new platform-tool package descriptor. |
static IPkgDesc |
newSample(AndroidVersion version,
MajorRevision revision,
FullRevision minToolsRev)
Create a new sample package descriptor. |
static IPkgDesc |
newSource(AndroidVersion version,
MajorRevision revision)
Create a new source package descriptor. |
static IPkgDesc |
newSysImg(AndroidVersion version,
java.lang.String abi,
MajorRevision revision)
Create a new system-image package descriptor. |
static IPkgDesc |
newTool(FullRevision revision,
FullRevision minPlatformToolsRev)
Create a new tool package descriptor. |
java.lang.String |
toString()
String representation for debugging purposes. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.android.sdklib.repository.descriptors.IPkgDesc |
|---|
isUpdateFor |
| Constructor Detail |
|---|
public PkgDesc()
| Method Detail |
|---|
@NonNull public abstract PkgType getType()
IPkgDesc
getType in interface IPkgDescPkgType constants.public final boolean hasFullRevision()
IPkgCapabilitiesFullRevision.
hasFullRevision in interface IPkgCapabilitiesFullRevision.public final boolean hasMajorRevision()
IPkgCapabilitiesMajorRevision.
hasMajorRevision in interface IPkgCapabilitiesMajorRevision.public final boolean hasAndroidVersion()
IPkgCapabilitiesAndroidVersion.
hasAndroidVersion in interface IPkgCapabilitiesAndroidVersion.public final boolean hasPath()
IPkgCapabilities
hasPath in interface IPkgCapabilitiespublic boolean hasVendorId()
IPkgCapabilities
hasVendorId in interface IPkgCapabilitiespublic final boolean hasMinToolsRev()
IPkgCapabilitiesmin-tools-rev attribute.
hasMinToolsRev in interface IPkgCapabilitiesmin-tools-rev attribute.public final boolean hasMinPlatformToolsRev()
IPkgCapabilitiesmin-platform-tools-rev attribute.
hasMinPlatformToolsRev in interface IPkgCapabilitiesmin-platform-tools-rev attribute.@Nullable public FullRevision getFullRevision()
IPkgDescFullRevision or null.
getFullRevision in interface IPkgDescIPkgCapabilities.hasFullRevision() is true; otherwise a null value.@Nullable public MajorRevision getMajorRevision()
IPkgDescMajorRevision or null.
getMajorRevision in interface IPkgDescIPkgCapabilities.hasMajorRevision() is true; otherwise a null value.@Nullable public AndroidVersion getAndroidVersion()
IPkgDescAndroidVersion or null.
getAndroidVersion in interface IPkgDescIPkgCapabilities.hasAndroidVersion() is true; otherwise a null value.@Nullable public java.lang.String getPath()
IPkgDescPkgType.PKG_SYS_IMAGES, the path is the system-image ABI. PkgType.PKG_PLATFORMS, the path is the platform hash string. PkgType.PKG_ADDONS, the path is the platform hash string. PkgType.PKG_EXTRAS, the path is the extra-path string.
getPath in interface IPkgDescIPkgCapabilities.hasPath() is true; otherwise a null value.@Nullable public java.lang.String getVendorId()
IPkgDesc
getVendorId in interface IPkgDescIPkgCapabilities.hasVendorId() is true; otherwise a null value.@Nullable public FullRevision getMinToolsRev()
IPkgDescmin-tools-rev or null.
getMinToolsRev in interface IPkgDescIPkgCapabilities.hasMinToolsRev() is true; otherwise a null value.@Nullable public FullRevision getMinPlatformToolsRev()
IPkgDescmin-platform-tools-rev or null.
getMinPlatformToolsRev in interface IPkgDescIPkgCapabilities.hasMinPlatformToolsRev() is true; otherwise null.
protected final boolean isGenericUpdateFor(@NonNull
IPkgDesc existingDesc)
IPkgDesc.isUpdateFor(IPkgDesc).
Individual package types use this and complement with their own specific cases
as needed.
existingDesc - A non-null package descriptor to compare with.
public int compareTo(@NonNull
IPkgDesc o)
compareTo in interface java.lang.Comparable<IPkgDesc>public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object
@NonNull
public static IPkgDesc newTool(@NonNull
FullRevision revision,
@NonNull
FullRevision minPlatformToolsRev)
revision - The revision of the tool package.minPlatformToolsRev - The min-platform-tools-rev.
Use FullRevision.NOT_SPECIFIED to indicate there is no requirement.
PkgDesc describing this tool package.
@NonNull
public static IPkgDesc newPlatformTool(@NonNull
FullRevision revision)
revision - The revision of the platform-tool package.
PkgDesc describing this platform-tool package.
@NonNull
public static IPkgDesc newBuildTool(@NonNull
FullRevision revision)
revision - The revision of the build-tool package.
PkgDesc describing this build-tool package.
@NonNull
public static IPkgDesc newDoc(@NonNull
AndroidVersion version,
@NonNull
MajorRevision revision)
revision - The revision of the doc package.
PkgDesc describing this doc package.
@NonNull
public static IPkgDescExtra newExtra(@NonNull
java.lang.String vendorId,
@NonNull
java.lang.String path,
@Nullable
java.lang.String[] oldPaths,
@NonNull
NoPreviewRevision revision)
vendorId - The vendor id string of the extra package.path - The path id string of the extra package.oldPaths - An optional list of older paths for this extra package.revision - The revision of the extra package.
PkgDesc describing this extra package.
@NonNull
public static IPkgDesc newPlatform(@NonNull
AndroidVersion version,
@NonNull
MajorRevision revision,
@NonNull
FullRevision minToolsRev)
version - The android version of the platform package.revision - The revision of the extra package.minToolsRev - An optional min-tools-rev.
Use FullRevision.NOT_SPECIFIED to indicate
there is no requirement.
PkgDesc describing this platform package.
@NonNull
public static IPkgDesc newAddon(@NonNull
AndroidVersion version,
@NonNull
MajorRevision revision,
@NonNull
java.lang.String addonVendor,
@NonNull
java.lang.String addonName)
version - The android version of the add-on package.revision - The revision of the add-on package.addonVendor - The vendor id of the add-on package.addonName - The name id of the add-on package.
PkgDesc describing this add-on package.
@NonNull
public static IPkgDesc newAddon(@NonNull
AndroidVersion version,
@NonNull
MajorRevision revision,
@NonNull
IAddonDesc targetHashProvider)
version - The android version of the add-on package.revision - The revision of the add-on package.targetHashProvider - Implements a method that will return the target hash when needed.
PkgDesc describing this add-on package.
@NonNull
public static IPkgDesc newSysImg(@NonNull
AndroidVersion version,
@NonNull
java.lang.String abi,
@NonNull
MajorRevision revision)
getPath() returns the ABI.
version - The android version of the system-image package.abi - The ABI of the system-image package.revision - The revision of the system-image package.
PkgDesc describing this system-image package.
@NonNull
public static IPkgDesc newSource(@NonNull
AndroidVersion version,
@NonNull
MajorRevision revision)
version - The android version of the source package.revision - The revision of the source package.
PkgDesc describing this source package.
@NonNull
public static IPkgDesc newSample(@NonNull
AndroidVersion version,
@NonNull
MajorRevision revision,
@NonNull
FullRevision minToolsRev)
version - The android version of the sample package.revision - The revision of the sample package.minToolsRev - An optional min-tools-rev.
Use FullRevision.NOT_SPECIFIED to indicate
there is no requirement.
PkgDesc describing this sample package.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||