|
|||||||||
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. |
IdDisplay |
getTag()
Returns the package's tag id-display tuple 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 |
hasTag()
Indicates whether this package type has a tag. |
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,
IdDisplay tag,
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 IPkgDesc
PkgType
constants.public final boolean hasFullRevision()
IPkgCapabilities
FullRevision
.
hasFullRevision
in interface IPkgCapabilities
FullRevision
.public final boolean hasMajorRevision()
IPkgCapabilities
MajorRevision
.
hasMajorRevision
in interface IPkgCapabilities
MajorRevision
.public final boolean hasAndroidVersion()
IPkgCapabilities
AndroidVersion
.
hasAndroidVersion
in interface IPkgCapabilities
AndroidVersion
.public final boolean hasPath()
IPkgCapabilities
hasPath
in interface IPkgCapabilities
public final boolean hasTag()
IPkgCapabilities
hasTag
in interface IPkgCapabilities
public boolean hasVendorId()
IPkgCapabilities
hasVendorId
in interface IPkgCapabilities
public final boolean hasMinToolsRev()
IPkgCapabilities
min-tools-rev
attribute.
hasMinToolsRev
in interface IPkgCapabilities
min-tools-rev
attribute.public final boolean hasMinPlatformToolsRev()
IPkgCapabilities
min-platform-tools-rev
attribute.
hasMinPlatformToolsRev
in interface IPkgCapabilities
min-platform-tools-rev
attribute.@Nullable public FullRevision getFullRevision()
IPkgDesc
FullRevision
or null.
getFullRevision
in interface IPkgDesc
IPkgCapabilities.hasFullRevision()
is true; otherwise a null value.@Nullable public MajorRevision getMajorRevision()
IPkgDesc
MajorRevision
or null.
getMajorRevision
in interface IPkgDesc
IPkgCapabilities.hasMajorRevision()
is true; otherwise a null value.@Nullable public AndroidVersion getAndroidVersion()
IPkgDesc
AndroidVersion
or null.
getAndroidVersion
in interface IPkgDesc
IPkgCapabilities.hasAndroidVersion()
is true; otherwise a null value.@Nullable public java.lang.String getPath()
IPkgDesc
PkgType.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 IPkgDesc
IPkgCapabilities.hasPath()
is true; otherwise a null value.@Nullable public IdDisplay getTag()
IPkgDesc
getTag
in interface IPkgDesc
IPkgCapabilities.hasTag()
is true; otherwise a null value.@Nullable public java.lang.String getVendorId()
IPkgDesc
getVendorId
in interface IPkgDesc
IPkgCapabilities.hasVendorId()
is true; otherwise a null value.@Nullable public FullRevision getMinToolsRev()
IPkgDesc
min-tools-rev
or null.
getMinToolsRev
in interface IPkgDesc
IPkgCapabilities.hasMinToolsRev()
is true; otherwise a null value.@Nullable public FullRevision getMinPlatformToolsRev()
IPkgDesc
min-platform-tools-rev
or null.
getMinPlatformToolsRev
in interface IPkgDesc
IPkgCapabilities.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.Object
public int hashCode()
hashCode
in class java.lang.Object
public 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 IdDisplay tag, @NonNull java.lang.String abi, @NonNull MajorRevision revision)
getPath()
returns the ABI.
version
- The android version of the system-image package.tag
- The tag 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 |