com.android.sdklib
Class SystemImage

java.lang.Object
  extended by com.android.sdklib.SystemImage
All Implemented Interfaces:
ISystemImage, java.lang.Comparable<ISystemImage>

public class SystemImage
extends java.lang.Object
implements ISystemImage

Describes a system image as used by an IAndroidTarget. A system image has an installation path, a location type, a tag and an ABI type.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.android.sdklib.ISystemImage
ISystemImage.LocationType
 
Field Summary
static IdDisplay DEFAULT_TAG
           
 
Constructor Summary
SystemImage(java.io.File location, ISystemImage.LocationType locationType, IdDisplay tagName, IdDisplay addonVendor, java.lang.String abiType, java.io.File[] skins)
          Creates a SystemImage description for an existing system image folder, for either platform or add-on.
SystemImage(java.io.File location, ISystemImage.LocationType locationType, IdDisplay tag, java.lang.String abiType, java.io.File[] skins)
          Creates a SystemImage description for an existing platform system image folder.
SystemImage(SdkManager sdkManager, IAndroidTarget target, ISystemImage.LocationType locationType, IdDisplay tag, IdDisplay addonVendor, java.lang.String abiType, java.io.File[] skins)
          Creates a SystemImage description for a non-existing system image folder, for either platform or add-on.
SystemImage(SdkManager sdkManager, IAndroidTarget target, ISystemImage.LocationType locationType, IdDisplay tag, java.lang.String abiType, java.io.File[] skins)
          Creates a SystemImage description for a non-existing platform system image folder.
 
Method Summary
 int compareTo(ISystemImage other)
          Sort by tag & ABI name only.
 java.lang.String getAbiType()
          Returns the ABI type.
 IdDisplay getAddonVendor()
          Returns the vendor for an add-on's system image, or null for a platform system-image.
 java.io.File getLocation()
          Returns the actual location of an installed system image.
 ISystemImage.LocationType getLocationType()
          Indicates the location strategy for this system image in the SDK.
 java.io.File[] getSkins()
          Returns the skins embedded in the system image.
 IdDisplay getTag()
          Returns the tag of the system image.
 java.lang.String toString()
          Generates a string representation suitable for debug purposes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_TAG

public static final IdDisplay DEFAULT_TAG
Constructor Detail

SystemImage

public SystemImage(@NonNull
                   java.io.File location,
                   @NonNull
                   ISystemImage.LocationType locationType,
                   @NonNull
                   IdDisplay tag,
                   @NonNull
                   java.lang.String abiType,
                   @NonNull
                   java.io.File[] skins)
Creates a SystemImage description for an existing platform system image folder.

Parameters:
location - The location of an installed system image.
locationType - Where the system image folder is located for this ABI.
tag - The tag of the system-image. Use DEFAULT_TAG for backward compatibility.
abiType - The ABI type. For example, one of SdkConstants.ABI_ARMEABI, SdkConstants.ABI_ARMEABI_V7A, SdkConstants.ABI_INTEL_ATOM or SdkConstants.ABI_MIPS.
skins - A non-null, possibly empty list of skins specific to this system image.

SystemImage

public SystemImage(@NonNull
                   java.io.File location,
                   @NonNull
                   ISystemImage.LocationType locationType,
                   @NonNull
                   IdDisplay tagName,
                   @Nullable
                   IdDisplay addonVendor,
                   @NonNull
                   java.lang.String abiType,
                   @NonNull
                   java.io.File[] skins)
Creates a SystemImage description for an existing system image folder, for either platform or add-on.

Parameters:
location - The location of an installed system image.
locationType - Where the system image folder is located for this ABI.
tagName - The tag of the system-image. For an add-on, the tag-id must match the add-on's name-id.
addonVendor - Non-null add-on vendor name. Null for platforms.
abiType - The ABI type. For example, one of SdkConstants.ABI_ARMEABI, SdkConstants.ABI_ARMEABI_V7A, SdkConstants.ABI_INTEL_ATOM or SdkConstants.ABI_MIPS.
skins - A non-null, possibly empty list of skins specific to this system image.

SystemImage

public SystemImage(@NonNull
                   SdkManager sdkManager,
                   @NonNull
                   IAndroidTarget target,
                   @NonNull
                   ISystemImage.LocationType locationType,
                   @NonNull
                   IdDisplay tag,
                   @NonNull
                   java.lang.String abiType,
                   @NonNull
                   java.io.File[] skins)
Creates a SystemImage description for a non-existing platform system image folder. The actual location is computed based on the locationType.

Parameters:
sdkManager - The current SDK manager.
locationType - Where the system image folder is located for this ABI.
tag - The tag of the system-image. Use DEFAULT_TAG for backward compatibility.
abiType - The ABI type. For example, one of SdkConstants.ABI_ARMEABI, SdkConstants.ABI_ARMEABI_V7A, SdkConstants.ABI_INTEL_ATOM or SdkConstants.ABI_MIPS.
skins - A non-null, possibly empty list of skins specific to this system image.
Throws:
java.lang.IllegalArgumentException - if the target used for ISystemImage.LocationType.IN_SYSTEM_IMAGE is not a PlatformTarget.

SystemImage

public SystemImage(@NonNull
                   SdkManager sdkManager,
                   @NonNull
                   IAndroidTarget target,
                   @NonNull
                   ISystemImage.LocationType locationType,
                   @NonNull
                   IdDisplay tag,
                   @Nullable
                   IdDisplay addonVendor,
                   @NonNull
                   java.lang.String abiType,
                   @NonNull
                   java.io.File[] skins)
Creates a SystemImage description for a non-existing system image folder, for either platform or add-on. The actual location is computed based on the locationType.

Parameters:
sdkManager - The current SDK manager.
locationType - Where the system image folder is located for this ABI.
tag - The tag of the system-image. Use DEFAULT_TAG for backward compatibility.
addonVendor - Non-null add-on vendor name. Null for platforms.
abiType - The ABI type. For example, one of SdkConstants.ABI_ARMEABI, SdkConstants.ABI_ARMEABI_V7A, SdkConstants.ABI_INTEL_ATOM or SdkConstants.ABI_MIPS.
skins - A non-null, possibly empty list of skins specific to this system image.
Throws:
java.lang.IllegalArgumentException - if the target used for ISystemImage.LocationType.IN_SYSTEM_IMAGE is not a PlatformTarget.
Method Detail

getLocation

@NonNull
public java.io.File getLocation()
Returns the actual location of an installed system image.

Specified by:
getLocation in interface ISystemImage

getLocationType

@NonNull
public ISystemImage.LocationType getLocationType()
Indicates the location strategy for this system image in the SDK.

Specified by:
getLocationType in interface ISystemImage

getTag

@NonNull
public IdDisplay getTag()
Returns the tag of the system image.

Specified by:
getTag in interface ISystemImage

getAddonVendor

@Nullable
public IdDisplay getAddonVendor()
Returns the vendor for an add-on's system image, or null for a platform system-image.

Specified by:
getAddonVendor in interface ISystemImage

getAbiType

@NonNull
public java.lang.String getAbiType()
Returns the ABI type. See Abi for a full list. Cannot be null nor empty.

Specified by:
getAbiType in interface ISystemImage

getSkins

@NonNull
public java.io.File[] getSkins()
Description copied from interface: ISystemImage
Returns the skins embedded in the system image.
Only supported by system images using ISystemImage.LocationType.IN_SYSTEM_IMAGE.
The skins listed here are merged in the IAndroidTarget.getSkins() list.

Specified by:
getSkins in interface ISystemImage
Returns:
A non-null skin list, possibly empty.

compareTo

public int compareTo(ISystemImage other)
Sort by tag & ABI name only. This is what matters from a user point of view.

Specified by:
compareTo in interface java.lang.Comparable<ISystemImage>

toString

@NonNull
public java.lang.String toString()
Generates a string representation suitable for debug purposes. The string is not intended to be displayed to the user.

Overrides:
toString in class java.lang.Object