|
|||||||||
| 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 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.
| Nested Class Summary | |
|---|---|
static class |
PkgDesc.Builder
|
static interface |
PkgDesc.IGetPath
|
static interface |
PkgDesc.IIsUpdateFor
|
| Field Summary | |
|---|---|
static java.lang.String |
PREVIEW_SUFFIX
|
| Constructor Summary | |
|---|---|
protected |
PkgDesc(PkgType type,
com.android.repository.api.License license,
java.lang.String listDisplay,
java.lang.String descriptionShort,
java.lang.String descriptionUrl,
boolean isObsolete,
com.android.repository.Revision revision,
com.android.sdklib.AndroidVersion androidVersion,
java.lang.String path,
IdDisplay tag,
IdDisplay vendor,
com.android.repository.Revision minToolsRev,
com.android.repository.Revision minPlatformToolsRev,
PkgDesc.IIsUpdateFor customIsUpdateFor,
PkgDesc.IGetPath customPath,
IdDisplay name)
|
| Method Summary | |
|---|---|
int |
compareTo(IPkgDesc o)
Compares this descriptor to another one. |
boolean |
equals(java.lang.Object obj)
|
com.android.sdklib.AndroidVersion |
getAndroidVersion()
Returns the package's AndroidVersion or null. |
java.lang.String |
getBaseInstallId()
Returns a stable string id that can be used to reference this package, which excludes the preview suffix. |
java.io.File |
getCanonicalInstallFolder(java.io.File sdkLocation)
Returns the canonical location where such a package would be installed. |
java.lang.String |
getDescriptionShort()
|
java.lang.String |
getDescriptionUrl()
|
java.lang.String |
getInstallId()
Returns a stable string id that can be used to reference this package, including a suffix indicating that this package is a preview if it is. |
com.android.repository.api.License |
getLicense()
|
java.lang.String |
getListDescription()
|
java.lang.String |
getListDisplay()
Returns the list-display meta data of this package. |
com.android.repository.Revision |
getMinPlatformToolsRev()
Returns the package's min-platform-tools-rev or null. |
com.android.repository.Revision |
getMinToolsRev()
Returns the package's min-tools-rev or null. |
IdDisplay |
getName()
|
java.lang.String |
getPath()
Returns the package's path string or null. |
com.android.repository.Revision |
getRevision()
Returns the package's Revision. |
IdDisplay |
getTag()
Returns the package's tag id-display tuple or null. |
PkgType |
getType()
Returns the type of the package. |
IdDisplay |
getVendor()
Returns the package's vendor-id string or null. |
boolean |
hasAndroidVersion()
|
int |
hashCode()
|
boolean |
hasMinPlatformToolsRev()
|
boolean |
hasMinToolsRev()
|
boolean |
hasName()
|
boolean |
hasPath()
|
boolean |
hasTag()
|
boolean |
hasVendor()
|
boolean |
isObsolete()
|
boolean |
isPreview()
|
boolean |
isUpdateFor(IPkgDesc existingDesc)
Computes the most general case of isUpdateFor(IPkgDesc). |
boolean |
isUpdateFor(IPkgDesc existingDesc,
com.android.repository.Revision.PreviewComparison previewComparison)
Indicates whether this package descriptor is an update for the given existing descriptor, using the given comparison method. |
protected java.lang.String |
patternReplaceImpl(java.lang.String result)
|
java.lang.String |
toString()
String representation for debugging purposes. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PREVIEW_SUFFIX
| Constructor Detail |
|---|
protected PkgDesc(@NonNull
PkgType type,
@Nullable
com.android.repository.api.License license,
@Nullable
java.lang.String listDisplay,
@Nullable
java.lang.String descriptionShort,
@Nullable
java.lang.String descriptionUrl,
boolean isObsolete,
@Nullable
com.android.repository.Revision revision,
@Nullable
com.android.sdklib.AndroidVersion androidVersion,
@Nullable
java.lang.String path,
@Nullable
IdDisplay tag,
@Nullable
IdDisplay vendor,
@Nullable
com.android.repository.Revision minToolsRev,
@Nullable
com.android.repository.Revision minPlatformToolsRev,
@Nullable
PkgDesc.IIsUpdateFor customIsUpdateFor,
@Nullable
PkgDesc.IGetPath customPath,
@Nullable
IdDisplay name)
| Method Detail |
|---|
@NonNull public PkgType getType()
IPkgDesc
getType in interface IPkgDescPkgType constants.@Nullable public java.lang.String getListDisplay()
IPkgDesc
getListDisplay in interface IPkgDesc@Nullable public IdDisplay getName()
getName in interface IPkgDesc@Nullable public java.lang.String getDescriptionShort()
getDescriptionShort in interface IPkgDesc@Nullable public java.lang.String getDescriptionUrl()
getDescriptionUrl in interface IPkgDesc@Nullable public com.android.repository.api.License getLicense()
getLicense in interface IPkgDescpublic boolean isObsolete()
isObsolete in interface IPkgDescpublic final boolean hasAndroidVersion()
hasAndroidVersion in interface IPkgDescpublic final boolean hasPath()
hasPath in interface IPkgDescpublic final boolean hasTag()
hasTag in interface IPkgDescpublic boolean hasVendor()
hasVendor in interface IPkgDescpublic boolean hasName()
public final boolean hasMinToolsRev()
hasMinToolsRev in interface IPkgDescpublic final boolean hasMinPlatformToolsRev()
hasMinPlatformToolsRev in interface IPkgDesc@NonNull public final com.android.repository.Revision getRevision()
IPkgDescRevision.
getRevision in interface IPkgDesc@Nullable public com.android.sdklib.AndroidVersion getAndroidVersion()
IPkgDescAndroidVersion or null.
getAndroidVersion in interface IPkgDescIPkgDesc.hasAndroidVersion() is true; otherwise a null value.public boolean isPreview()
isPreview in interface IPkgDesc@Nullable public java.lang.String getPath()
IPkgDescPkgType.PKG_SYS_IMAGE, the path is the system-image ABI. PkgType.PKG_PLATFORM, the path is the platform hash string. PkgType.PKG_ADDON, the path is the platform hash string. PkgType.PKG_EXTRA, the path is the extra-path string.
getPath in interface IPkgDescIPkgDesc.hasPath() is true; otherwise a null value.@Nullable public IdDisplay getTag()
IPkgDesc
getTag in interface IPkgDescIPkgDesc.hasTag() is true; otherwise a null value.@Nullable public IdDisplay getVendor()
IPkgDesc
getVendor in interface IPkgDescIPkgDesc.hasVendor() is true; otherwise a null value.@Nullable public com.android.repository.Revision getMinToolsRev()
IPkgDescmin-tools-rev or null.
getMinToolsRev in interface IPkgDescIPkgDesc.hasMinToolsRev() is true; otherwise a null value.@Nullable public com.android.repository.Revision getMinPlatformToolsRev()
IPkgDescmin-platform-tools-rev or null.
getMinPlatformToolsRev in interface IPkgDescIPkgDesc.hasMinPlatformToolsRev() is true; otherwise null.public java.lang.String getInstallId()
IPkgDesc
getInstallId in interface IPkgDescpublic java.lang.String getBaseInstallId()
IPkgDesc
getBaseInstallId in interface IPkgDesc
public java.io.File getCanonicalInstallFolder(@NonNull
java.io.File sdkLocation)
IPkgDesc
getCanonicalInstallFolder in interface IPkgDescsdkLocation - The root of the SDK.
public boolean isUpdateFor(@NonNull
IPkgDesc existingDesc)
isUpdateFor(IPkgDesc).
Individual package types use this and complement with their own specific cases
as needed.
isUpdateFor in interface IPkgDescexistingDesc - A non-null package descriptor to compare with.
public boolean isUpdateFor(@NonNull
IPkgDesc existingDesc,
@NonNull
com.android.repository.Revision.PreviewComparison previewComparison)
IPkgDesc
isUpdateFor in interface IPkgDescexistingDesc - A non-null existing descriptor.previewComparison - The Revision.PreviewComparison method to use
when comparing the packages.
public int compareTo(@NonNull
IPkgDesc o)
compareTo in interface java.lang.Comparable<IPkgDesc>@NonNull public java.lang.String getListDescription()
getListDescription in interface IPkgDescprotected java.lang.String patternReplaceImpl(java.lang.String result)
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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||