com.android.sdklib.repository.descriptors
Enum PkgType

java.lang.Object
  extended by java.lang.Enum<PkgType>
      extended by com.android.sdklib.repository.descriptors.PkgType
All Implemented Interfaces:
IPkgCapabilities, java.io.Serializable, java.lang.Comparable<PkgType>

public enum PkgType
extends java.lang.Enum<PkgType>
implements IPkgCapabilities

Package types handled by the LocalSdk.

Integer bit values are provided via getIntValue() for backward compatibility with the older LocalSdkParser class. The integer bit values also indicate the natural ordering of the packages.


Enum Constant Summary
PKG_ADDON
          Filter the SDK/addons.
PKG_ADDON_SYS_IMAGE
          Filter the SDK/system-images/addons.
PKG_BUILD_TOOLS
          Filter the SDK/build-tools folder.
PKG_DOC
          Filter the SDK/docs folder.
PKG_EXTRA
          Filter the SDK/extras folder.
PKG_LLDB
          The SDK/lldb folder.
PKG_NDK
          The SDK/ndk folder.
PKG_PLATFORM
          Filter the SDK/platforms.
PKG_PLATFORM_TOOLS
          Filter the SDK/platform-tools folder.
PKG_SAMPLE
          Filter the SDK/samples folder.
PKG_SOURCE
          Filter the SDK/sources folder.
PKG_SYS_IMAGE
          Filter the SDK/system-images/android.
PKG_TOOLS
          Filter the SDK/tools folder.
 
Field Summary
static java.util.EnumSet<PkgType> PKG_ALL
          A collection of all the known PkgTypes.
static int PKG_ALL_INT
          Integer value matching all available pkg types, for the old LocalSdkParer.
 
Method Summary
 java.lang.String getFolderName()
          Returns the name of SDK top-folder where this type of package is stored.
 int getIntValue()
          Returns the integer value matching the type, compatible with the old LocalSdkParer.
 java.lang.String getListDisplayPattern()
           
 boolean hasAndroidVersion()
          Indicates whether this package type has a AndroidVersion.
 boolean hasFullRevision()
          Indicates whether this package type has a FullRevision.
 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.
static PkgType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PkgType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PKG_TOOLS

public static final PkgType PKG_TOOLS
Filter the SDK/tools folder. Has FullRevision.


PKG_PLATFORM_TOOLS

public static final PkgType PKG_PLATFORM_TOOLS
Filter the SDK/platform-tools folder. Has FullRevision.


PKG_BUILD_TOOLS

public static final PkgType PKG_BUILD_TOOLS
Filter the SDK/build-tools folder. Has FullRevision.


PKG_DOC

public static final PkgType PKG_DOC
Filter the SDK/docs folder. Has MajorRevision.


PKG_PLATFORM

public static final PkgType PKG_PLATFORM
Filter the SDK/platforms. Has AndroidVersion. Has MajorRevision. Path returns the platform's target hash.


PKG_SYS_IMAGE

public static final PkgType PKG_SYS_IMAGE
Filter the SDK/system-images/android. Has AndroidVersion. Has MajorRevision. Has tag. Path returns the system image ABI.


PKG_ADDON

public static final PkgType PKG_ADDON
Filter the SDK/addons. Has AndroidVersion. Has MajorRevision. Path returns the add-on's target hash.


PKG_ADDON_SYS_IMAGE

public static final PkgType PKG_ADDON_SYS_IMAGE
Filter the SDK/system-images/addons. Has AndroidVersion. Has MajorRevision. Has tag. Path returns the system image ABI.


PKG_SAMPLE

public static final PkgType PKG_SAMPLE
Filter the SDK/samples folder. Note: this will not detect samples located in the SDK/extras packages. Has AndroidVersion. Has MajorRevision.


PKG_SOURCE

public static final PkgType PKG_SOURCE
Filter the SDK/sources folder. Has AndroidVersion. Has MajorRevision.


PKG_EXTRA

public static final PkgType PKG_EXTRA
Filter the SDK/extras folder. Has Path. Has MajorRevision. Path returns the combined vendor id + extra path. Cast the descriptor to IPkgDescExtra to get extra's specific attributes.


PKG_NDK

public static final PkgType PKG_NDK
The SDK/ndk folder.


PKG_LLDB

public static final PkgType PKG_LLDB
The SDK/lldb folder.

Field Detail

PKG_ALL

public static final java.util.EnumSet<PkgType> PKG_ALL
A collection of all the known PkgTypes.


PKG_ALL_INT

public static final int PKG_ALL_INT
Integer value matching all available pkg types, for the old LocalSdkParer.

See Also:
Constant Field Values
Method Detail

values

public static PkgType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PkgType c : PkgType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PkgType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getIntValue

public int getIntValue()
Returns the integer value matching the type, compatible with the old LocalSdkParer.


getFolderName

@NonNull
public java.lang.String getFolderName()
Returns the name of SDK top-folder where this type of package is stored.


hasMajorRevision

public boolean hasMajorRevision()
Description copied from interface: IPkgCapabilities
Indicates whether this package type has a MajorRevision.

Specified by:
hasMajorRevision in interface IPkgCapabilities
Returns:
True if this package type has a MajorRevision.

hasFullRevision

public boolean hasFullRevision()
Description copied from interface: IPkgCapabilities
Indicates whether this package type has a FullRevision.

Specified by:
hasFullRevision in interface IPkgCapabilities
Returns:
True if this package type has a FullRevision.

hasAndroidVersion

public boolean hasAndroidVersion()
Description copied from interface: IPkgCapabilities
Indicates whether this package type has a AndroidVersion.

Specified by:
hasAndroidVersion in interface IPkgCapabilities
Returns:
True if this package type has a AndroidVersion.

hasPath

public boolean hasPath()
Description copied from interface: IPkgCapabilities
Indicates whether this package type has a path.

Specified by:
hasPath in interface IPkgCapabilities
Returns:
True if this package type has a path.

hasTag

public boolean hasTag()
Description copied from interface: IPkgCapabilities
Indicates whether this package type has a tag.

Specified by:
hasTag in interface IPkgCapabilities
Returns:
True if this package type has a tag id-display tuple.

hasVendor

public boolean hasVendor()
Description copied from interface: IPkgCapabilities
Indicates whether this package type has a vendor id.

Specified by:
hasVendor in interface IPkgCapabilities
Returns:
True if this package type has a vendor id.

hasMinToolsRev

public boolean hasMinToolsRev()
Description copied from interface: IPkgCapabilities
Indicates whether this package type has a min-tools-rev attribute.

Specified by:
hasMinToolsRev in interface IPkgCapabilities
Returns:
True if this package type has a min-tools-rev attribute.

hasMinPlatformToolsRev

public boolean hasMinPlatformToolsRev()
Description copied from interface: IPkgCapabilities
Indicates whether this package type has a min-platform-tools-rev attribute.

Specified by:
hasMinPlatformToolsRev in interface IPkgCapabilities
Returns:
True if this package type has a min-platform-tools-rev attribute.

getListDisplayPattern

public java.lang.String getListDisplayPattern()