com.android.sdklib.internal.repository.archives
Class ArchiveReplacement

java.lang.Object
  extended by com.android.sdklib.internal.repository.archives.ArchiveReplacement
All Implemented Interfaces:
IDescription
Direct Known Subclasses:
ArchiveInfo

public class ArchiveReplacement
extends java.lang.Object
implements IDescription

Represents an archive that we want to install and the archive that it is going to replace, if any.


Constructor Summary
ArchiveReplacement(Archive newArchive, Archive replaced)
          Creates a new replacement where the newArchive will replace the currently installed replaced archive.
 
Method Summary
 java.lang.String getLongDescription()
          Returns the long description of the parent package of the new archive, if not null.
 Archive getNewArchive()
          Returns the "new archive" to be installed.
 Archive getReplaced()
          Returns an optional local archive that the new one will replace.
 java.lang.String getShortDescription()
          Returns the short description of the parent package of the new archive, if not null.
 java.lang.String toString()
          Returns the short description of the parent package of the new archive, if not null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArchiveReplacement

public ArchiveReplacement(Archive newArchive,
                          Archive replaced)
Creates a new replacement where the newArchive will replace the currently installed replaced archive. When newArchive is not intended to replace anything (e.g. because the user is installing a new package not present on her system yet), then replace shall be null.

Parameters:
newArchive - A "new archive" to be installed. This is always an archive that comes from a remote site. This may be null.
replaced - An optional local archive that the new one will replace. Can be null if this archive does not replace anything.
Method Detail

getNewArchive

public Archive getNewArchive()
Returns the "new archive" to be installed. This may be null for missing archives.


getReplaced

public Archive getReplaced()
Returns an optional local archive that the new one will replace. Can be null if this archive does not replace anything.


getLongDescription

public java.lang.String getLongDescription()
Returns the long description of the parent package of the new archive, if not null. Otherwise returns an empty string.

Specified by:
getLongDescription in interface IDescription

getShortDescription

public java.lang.String getShortDescription()
Returns the short description of the parent package of the new archive, if not null. Otherwise returns an empty string.

Specified by:
getShortDescription in interface IDescription

toString

public java.lang.String toString()
Returns the short description of the parent package of the new archive, if not null. Otherwise returns the default Object toString result.

This is mostly helpful for debugging. For UI display, use the IDescription interface.

Overrides:
toString in class java.lang.Object