|
|||||||||
| 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,
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)
|
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()
Returns a description of this package that is suitable for a list display. |
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()
Indicates whether this package type has a AndroidVersion. |
int |
hashCode()
|
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 |
hasName()
Indicates whether this package type has a name attribute. |
boolean |
hasPath()
Indicates whether this package type has a path. |
boolean |
hasTag()
Indicates whether this package type has a tag. |
boolean |
hasVendor()
Indicates whether this package type has a vendor id. |
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
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()
IPkgCapabilitiesAndroidVersion.
hasAndroidVersion in interface IPkgCapabilitiesAndroidVersion.public final boolean hasPath()
IPkgCapabilities
hasPath in interface IPkgCapabilitiespublic final boolean hasTag()
IPkgCapabilities
hasTag in interface IPkgCapabilitiespublic boolean hasVendor()
IPkgCapabilities
hasVendor in interface IPkgCapabilitiespublic boolean hasName()
IPkgCapabilitiesname attribute.
hasName in interface IPkgCapabilitiesname attribute.public 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.@NonNull public final com.android.repository.Revision getRevision()
IPkgDescRevision.
getRevision in interface IPkgDesc@Nullable public AndroidVersion getAndroidVersion()
IPkgDescAndroidVersion or null.
getAndroidVersion in interface IPkgDescIPkgCapabilities.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 IPkgDescIPkgCapabilities.hasPath() is true; otherwise a null value.@Nullable public IdDisplay getTag()
IPkgDesc
getTag in interface IPkgDescIPkgCapabilities.hasTag() is true; otherwise a null value.@Nullable public IdDisplay getVendor()
IPkgDesc
getVendor in interface IPkgDescIPkgCapabilities.hasVendor() is true; otherwise a null value.@Nullable public com.android.repository.Revision getMinToolsRev()
IPkgDescmin-tools-rev or null.
getMinToolsRev in interface IPkgDescIPkgCapabilities.hasMinToolsRev() is true; otherwise a null value.@Nullable public com.android.repository.Revision getMinPlatformToolsRev()
IPkgDescmin-platform-tools-rev or null.
getMinPlatformToolsRev in interface IPkgDescIPkgCapabilities.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()
IListDescriptionIDescription.getShortDescription() should be used if you
want more details such as the package revision number or the API, if applicable.
getListDescription in interface IListDescriptionprotected 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 | ||||||||