com.android.sdklib.internal.repository.packages
Class MinToolsPackage

java.lang.Object
  extended by com.android.sdklib.internal.repository.packages.Package
      extended by com.android.sdklib.internal.repository.packages.MajorRevisionPackage
          extended by com.android.sdklib.internal.repository.packages.MinToolsPackage
All Implemented Interfaces:
IDescription, IMinToolsDependency, java.lang.Comparable<Package>
Direct Known Subclasses:
ExtraPackage, PlatformPackage, SamplePackage

public abstract class MinToolsPackage
extends MajorRevisionPackage
implements IMinToolsDependency

Represents an XML node in an SDK repository that has a min-tools-rev requirement.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.android.sdklib.internal.repository.packages.Package
Package.License, Package.UpdateInfo
 
Field Summary
 
Fields inherited from interface com.android.sdklib.internal.repository.packages.IMinToolsDependency
MIN_TOOLS_REV_NOT_SPECIFIED
 
Constructor Summary
MinToolsPackage(SdkSource source, java.util.Properties props, int revision, java.lang.String license, java.lang.String description, java.lang.String descUrl, Archive.Os archiveOs, Archive.Arch archiveArch, java.lang.String archiveOsPath)
          Manually create a new package with one archive and the given attributes.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 FullRevision getMinToolsRevision()
          The minimal revision of the tools package required by this extra package, if > 0, or IMinToolsDependency.MIN_TOOLS_REV_NOT_SPECIFIED if there is no such requirement.
 int hashCode()
           
 void saveProperties(java.util.Properties props)
          Save the properties of the current packages in the given Properties object.
 
Methods inherited from class com.android.sdklib.internal.repository.packages.MajorRevisionPackage
canBeUpdatedBy, getRevision
 
Methods inherited from class com.android.sdklib.internal.repository.packages.Package
compareTo, comparisonKey, getArchives, getDescription, getDescUrl, getInstallFolder, getLicense, getListDescription, getLongDescription, getParentSource, getReleaseNote, getReleaseNoteUrl, getShortDescription, hasArchive, hasCompatibleArchive, initializeArchives, installId, isLocal, isObsolete, postInstallHook, postUnzipFileHook, preInstallHook, sameItemAs, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MinToolsPackage

public MinToolsPackage(SdkSource source,
                       java.util.Properties props,
                       int revision,
                       java.lang.String license,
                       java.lang.String description,
                       java.lang.String descUrl,
                       Archive.Os archiveOs,
                       Archive.Arch archiveArch,
                       java.lang.String archiveOsPath)
Manually create a new package with one archive and the given attributes. This is used to create packages from local directories in which case there must be one archive which URL is the actual target location.

Properties from props are used first when possible, e.g. if props is non null.

By design, this creates a package with one and only one archive.

Method Detail

getMinToolsRevision

public FullRevision getMinToolsRevision()
The minimal revision of the tools package required by this extra package, if > 0, or IMinToolsDependency.MIN_TOOLS_REV_NOT_SPECIFIED if there is no such requirement.

Specified by:
getMinToolsRevision in interface IMinToolsDependency

saveProperties

public void saveProperties(java.util.Properties props)
Description copied from class: Package
Save the properties of the current packages in the given Properties object. These properties will later be give the constructor that takes a Properties object.

Overrides:
saveProperties in class MajorRevisionPackage

hashCode

public int hashCode()
Overrides:
hashCode in class Package

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class Package