Class PkgDesc
- java.lang.Object
-
- com.android.sdklib.repository.legacy.descriptors.PkgDesc
-
- Direct Known Subclasses:
PkgDescExtra
@Deprecated public class PkgDesc extends java.lang.Object implements IPkgDesc
Deprecated.This is part of the old SDK manager framework. UseAndroidSdkHandler/RepoManagerand associated classes instead.PkgDesckeeps information on individual SDK packages (both local or remote packages definitions.)
Packages have different attributes depending on their type.To create a new
PkgDesc, use one of the package-specific constructors provided here.To query packages capabilities, rely on
getType()and thePkgDesc.hasXxx()methods provided in the basePkgDesc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPkgDesc.BuilderDeprecated.static interfacePkgDesc.IGetPathDeprecated.static interfacePkgDesc.IIsUpdateForDeprecated.
-
Constructor Summary
Constructors Modifier Constructor Description protectedPkgDesc(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)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intcompareTo(IPkgDesc o)Deprecated.Compares this descriptor to another one.booleanequals(java.lang.Object obj)Deprecated.com.android.sdklib.AndroidVersiongetAndroidVersion()Deprecated.Returns the package'sAndroidVersionor null.java.lang.StringgetBaseInstallId()Deprecated.Returns a stable string id that can be used to reference this package, which excludes the preview suffix.java.nio.file.PathgetCanonicalInstallFolder(java.nio.file.Path sdkLocation)Deprecated.Returns the canonical location where such a package would be installed.java.lang.StringgetDescriptionShort()Deprecated.java.lang.StringgetDescriptionUrl()Deprecated.java.lang.StringgetInstallId()Deprecated.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.LicensegetLicense()Deprecated.java.lang.StringgetListDescription()Deprecated.java.lang.StringgetListDisplay()Deprecated.Returns the list-display meta data of this package.com.android.repository.RevisiongetMinPlatformToolsRev()Deprecated.Returns the package'smin-platform-tools-revor null.com.android.repository.RevisiongetMinToolsRev()Deprecated.Returns the package'smin-tools-revor null.IdDisplaygetName()Deprecated.java.lang.StringgetPath()Deprecated.Returns the package's path string or null.com.android.repository.RevisiongetRevision()Deprecated.Returns the package'sRevision.IdDisplaygetTag()Deprecated.Returns the package's tag id-display tuple or null.PkgTypegetType()Deprecated.Returns the type of the package.IdDisplaygetVendor()Deprecated.Returns the package's vendor-id string or null.booleanhasAndroidVersion()Deprecated.inthashCode()Deprecated.booleanhasMinPlatformToolsRev()Deprecated.booleanhasMinToolsRev()Deprecated.booleanhasName()Deprecated.booleanhasPath()Deprecated.booleanhasTag()Deprecated.booleanhasVendor()Deprecated.booleanisObsolete()Deprecated.booleanisPreview()Deprecated.booleanisUpdateFor(IPkgDesc existingDesc)Deprecated.Computes the most general case ofisUpdateFor(IPkgDesc).booleanisUpdateFor(IPkgDesc existingDesc, com.android.repository.Revision.PreviewComparison previewComparison)Deprecated.Indicates whether this package descriptor is an update for the given existing descriptor, using the given comparison method.protected java.lang.StringpatternReplaceImpl(java.lang.String result)Deprecated.java.lang.StringtoString()Deprecated.String representation for debugging purposes.
-
-
-
Constructor Detail
-
PkgDesc
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)Deprecated.
-
-
Method Detail
-
getType
@NonNull public PkgType getType()
Deprecated.Description copied from interface:IPkgDescReturns the type of the package.
-
getListDisplay
@Nullable public java.lang.String getListDisplay()
Deprecated.Description copied from interface:IPkgDescReturns the list-display meta data of this package.- Specified by:
getListDisplayin interfaceIPkgDesc- Returns:
- The list-display data, if available, or null.
-
getName
@Nullable public IdDisplay getName()
Deprecated.
-
getDescriptionShort
@Nullable public java.lang.String getDescriptionShort()
Deprecated.- Specified by:
getDescriptionShortin interfaceIPkgDesc
-
getDescriptionUrl
@Nullable public java.lang.String getDescriptionUrl()
Deprecated.- Specified by:
getDescriptionUrlin interfaceIPkgDesc
-
getLicense
@Nullable public com.android.repository.api.License getLicense()
Deprecated.- Specified by:
getLicensein interfaceIPkgDesc
-
isObsolete
public boolean isObsolete()
Deprecated.- Specified by:
isObsoletein interfaceIPkgDesc
-
hasAndroidVersion
public final boolean hasAndroidVersion()
Deprecated.- Specified by:
hasAndroidVersionin interfaceIPkgDesc
-
hasName
public boolean hasName()
Deprecated.
-
hasMinToolsRev
public final boolean hasMinToolsRev()
Deprecated.- Specified by:
hasMinToolsRevin interfaceIPkgDesc
-
hasMinPlatformToolsRev
public final boolean hasMinPlatformToolsRev()
Deprecated.- Specified by:
hasMinPlatformToolsRevin interfaceIPkgDesc
-
getRevision
@NonNull public final com.android.repository.Revision getRevision()
Deprecated.Description copied from interface:IPkgDescReturns the package'sRevision.- Specified by:
getRevisionin interfaceIPkgDesc
-
getAndroidVersion
@Nullable public com.android.sdklib.AndroidVersion getAndroidVersion()
Deprecated.Description copied from interface:IPkgDescReturns the package'sAndroidVersionor null.- Specified by:
getAndroidVersionin interfaceIPkgDesc- Returns:
- A non-null value if
IPkgDesc.hasAndroidVersion()is true; otherwise a null value.
-
isPreview
public boolean isPreview()
Deprecated.
-
getPath
@Nullable public java.lang.String getPath()
Deprecated.Description copied from interface:IPkgDescReturns the package's path string or null.For
PkgType.PKG_SYS_IMAGE, the path is the system-image ABI.
ForPkgType.PKG_PLATFORM, the path is the platform hash string.
ForPkgType.PKG_ADDON, the path is the platform hash string.
ForPkgType.PKG_EXTRA, the path is the extra-path string.- Specified by:
getPathin interfaceIPkgDesc- Returns:
- A non-null value if
IPkgDesc.hasPath()is true; otherwise a null value.
-
getTag
@Nullable public IdDisplay getTag()
Deprecated.Description copied from interface:IPkgDescReturns the package's tag id-display tuple or null.- Specified by:
getTagin interfaceIPkgDesc- Returns:
- A non-null tag if
IPkgDesc.hasTag()is true; otherwise a null value.
-
getVendor
@Nullable public IdDisplay getVendor()
Deprecated.Description copied from interface:IPkgDescReturns the package's vendor-id string or null.- Specified by:
getVendorin interfaceIPkgDesc- Returns:
- A non-null value if
IPkgDesc.hasVendor()is true; otherwise a null value.
-
getMinToolsRev
@Nullable public com.android.repository.Revision getMinToolsRev()
Deprecated.Description copied from interface:IPkgDescReturns the package'smin-tools-revor null.- Specified by:
getMinToolsRevin interfaceIPkgDesc- Returns:
- A non-null value if
IPkgDesc.hasMinToolsRev()is true; otherwise a null value.
-
getMinPlatformToolsRev
@Nullable public com.android.repository.Revision getMinPlatformToolsRev()
Deprecated.Description copied from interface:IPkgDescReturns the package'smin-platform-tools-revor null.- Specified by:
getMinPlatformToolsRevin interfaceIPkgDesc- Returns:
- A non-null value if
IPkgDesc.hasMinPlatformToolsRev()is true; otherwise null.
-
getInstallId
public java.lang.String getInstallId()
Deprecated.Description copied from interface:IPkgDescReturns 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.- Specified by:
getInstallIdin interfaceIPkgDesc
-
getBaseInstallId
public java.lang.String getBaseInstallId()
Deprecated.Description copied from interface:IPkgDescReturns a stable string id that can be used to reference this package, which excludes the preview suffix.- Specified by:
getBaseInstallIdin interfaceIPkgDesc
-
getCanonicalInstallFolder
@NonNull public java.nio.file.Path getCanonicalInstallFolder(@NonNull java.nio.file.Path sdkLocation)Deprecated.Description copied from interface:IPkgDescReturns the canonical location where such a package would be installed.- Specified by:
getCanonicalInstallFolderin interfaceIPkgDesc- Parameters:
sdkLocation- The root of the SDK.- Returns:
- the canonical location where such a package would be installed.
-
isUpdateFor
public boolean isUpdateFor(@NonNull IPkgDesc existingDesc)Deprecated.Computes the most general case ofisUpdateFor(IPkgDesc). Individual package types use this and complement with their own specific cases as needed.- Specified by:
isUpdateForin interfaceIPkgDesc- Parameters:
existingDesc- A non-null package descriptor to compare with.- Returns:
- True if this package descriptor would generally update the given one.
-
isUpdateFor
public boolean isUpdateFor(@NonNull IPkgDesc existingDesc, @NonNull com.android.repository.Revision.PreviewComparison previewComparison)Deprecated.Description copied from interface:IPkgDescIndicates whether this package descriptor is an update for the given existing descriptor, using the given comparison method.- Specified by:
isUpdateForin interfaceIPkgDesc- Parameters:
existingDesc- A non-null existing descriptor.previewComparison- TheRevision.PreviewComparisonmethod to use when comparing the packages.- Returns:
- True if this package is an update for the given one.
-
compareTo
public int compareTo(@NonNull IPkgDesc o)Deprecated.Compares this descriptor to another one. All fields must match for equality.This is must not be used an indication that a package is a suitable update for another one. The comparison order is however suitable for sorting packages for display purposes.
- Specified by:
compareToin interfacejava.lang.Comparable<IPkgDesc>
-
getListDescription
@NonNull public java.lang.String getListDescription()
Deprecated.- Specified by:
getListDescriptionin interfaceIPkgDesc
-
patternReplaceImpl
protected java.lang.String patternReplaceImpl(java.lang.String result)
Deprecated.
-
toString
public java.lang.String toString()
Deprecated.String representation for debugging purposes.- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Deprecated.- Overrides:
equalsin classjava.lang.Object
-
-