|
|||||||||
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 IPkgDesc
PkgType
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 IPkgDesc
public boolean isObsolete()
isObsolete
in interface IPkgDesc
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 hasVendor()
IPkgCapabilities
hasVendor
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_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 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 IdDisplay getVendor()
IPkgDesc
getVendor
in interface IPkgDesc
IPkgCapabilities.hasVendor()
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.public java.lang.String getInstallId()
IPkgDesc
getInstallId
in interface IPkgDesc
public java.io.File getCanonicalInstallFolder(@NonNull java.io.File sdkLocation)
IPkgDesc
getCanonicalInstallFolder
in interface IPkgDesc
sdkLocation
- 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 IPkgDesc
existingDesc
- 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.IListDescription
protected java.lang.String patternReplaceImpl(java.lang.String result)
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |