|
|||||||||
| 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
|
| Constructor Summary | |
|---|---|
protected |
PkgDesc(PkgType type,
com.android.sdklib.internal.repository.packages.License license,
java.lang.String listDisplay,
java.lang.String descriptionShort,
java.lang.String descriptionUrl,
boolean isObsolete,
FullRevision fullRevision,
MajorRevision majorRevision,
AndroidVersion androidVersion,
java.lang.String path,
IdDisplay tag,
IdDisplay vendor,
FullRevision minToolsRev,
FullRevision minPlatformToolsRev,
PkgDesc.IIsUpdateFor customIsUpdateFor,
PkgDesc.IGetPath customPath)
|
| 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.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()
|
FullRevision |
getFullRevision()
Returns the package's FullRevision or null. |
java.lang.String |
getInstallId()
Returns a stable string id that can be used to reference this package. |
com.android.sdklib.internal.repository.packages.License |
getLicense()
|
java.lang.String |
getListDescription()
|
java.lang.String |
getListDisplay()
Returns the list-display meta data of this package. |
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. |
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. |
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 |
hasVendor()
Indicates whether this package type has a vendor id. |
boolean |
isObsolete()
|
boolean |
isUpdateFor(IPkgDesc existingDesc)
Computes the most general case of isUpdateFor(IPkgDesc). |
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 |
| Constructor Detail |
|---|
protected PkgDesc(@NonNull
PkgType type,
@Nullable
com.android.sdklib.internal.repository.packages.License license,
@Nullable
java.lang.String listDisplay,
@Nullable
java.lang.String descriptionShort,
@Nullable
java.lang.String descriptionUrl,
boolean isObsolete,
@Nullable
FullRevision fullRevision,
@Nullable
MajorRevision majorRevision,
@Nullable
AndroidVersion androidVersion,
@Nullable
java.lang.String path,
@Nullable
IdDisplay tag,
@Nullable
IdDisplay vendor,
@Nullable
FullRevision minToolsRev,
@Nullable
FullRevision minPlatformToolsRev,
@Nullable
PkgDesc.IIsUpdateFor customIsUpdateFor,
@Nullable
PkgDesc.IGetPath customPath)
| 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 java.lang.String getDescriptionShort()
getDescriptionShort in interface IPkgDesc@Nullable public java.lang.String getDescriptionUrl()
getDescriptionUrl in interface IPkgDesc@Nullable public com.android.sdklib.internal.repository.packages.License getLicense()
getLicense in interface IPkgDescpublic boolean isObsolete()
isObsolete in interface IPkgDescpublic 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 final boolean hasTag()
IPkgCapabilities
hasTag in interface IPkgCapabilitiespublic boolean hasVendor()
IPkgCapabilities
hasVendor 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_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 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.public java.lang.String getInstallId()
IPkgDesc
getInstallId 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 int compareTo(@NonNull
IPkgDesc o)
compareTo in interface java.lang.Comparable<IPkgDesc>@NonNull public java.lang.String getListDescription()
getListDescription in interface com.android.sdklib.internal.repository.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 | ||||||||