com.android.ide.common.xml
Class ManifestData

java.lang.Object
  extended by com.android.ide.common.xml.ManifestData

public final class ManifestData
extends java.lang.Object

Class containing the manifest info obtained during the parsing.


Nested Class Summary
static class ManifestData.Activity
          Activity info obtained from the manifest.
static class ManifestData.Instrumentation
          Instrumentation info obtained from manifest
static class ManifestData.SupportsScreens
          Class representing the supports-screens node in the manifest.
static class ManifestData.UsesConfiguration
          Class representing the uses-configuration node in the manifest.
static class ManifestData.UsesFeature
          Class representing a uses-feature node in the manifest.
static class ManifestData.UsesLibrary
          Class representing a uses-library node in the manifest.
 
Field Summary
static int GL_ES_VERSION_NOT_SET
          Value returned by getGlEsVersion() when there are no node with the attribute glEsVersion set.
static int MIN_SDK_CODENAME
          Value returned by getMinSdkVersion() when the value of the minSdkVersion attribute in the manifest is a codename and not an integer value.
 
Constructor Summary
ManifestData()
           
 
Method Summary
 ManifestData.Activity[] getActivities()
          Returns the list of activities found in the manifest.
 java.lang.Boolean getDebuggable()
          Returns the debuggable attribute value or null if it is not set.
 int getGlEsVersion()
          Returns the glEsVersion from a or GL_ES_VERSION_NOT_SET if not set.
 ManifestData.Instrumentation[] getInstrumentations()
          Returns the list of instrumentations found in the manifest.
 ManifestData.Activity getLauncherActivity()
          Returns the name of one activity found in the manifest, that is configured to show up in the HOME screen.
 int getMinSdkVersion()
          Returns the minSdkVersion attribute, or 0 if it's not set or is a codename.
 java.lang.String getMinSdkVersionString()
          Returns the minSdkVersion attribute, or null if it's not set.
 java.lang.String getPackage()
          Returns the package defined in the manifest, if found.
 java.lang.String[] getProcesses()
          Returns the list of process names declared by the manifest.
 ManifestData.SupportsScreens getSupportsScreensFromManifest()
          Returns the ManifestData.SupportsScreens object representing the supports-screens node, or null if the node doesn't exist at all.
 ManifestData.SupportsScreens getSupportsScreensValues()
          Returns an always non-null instance of ManifestData.SupportsScreens that's been initialized with the default values, and the values from the manifest.
 int getTargetSdkVersion()
          Returns the targetSdkVersion attribute, or the same value as getMinSdkVersion() if it was not set in the manifest.
 ManifestData.UsesConfiguration getUsesConfiguration()
          Returns the ManifestData.UsesConfiguration object representing the uses-configuration node, or null if the node doesn't exist at all.
 ManifestData.UsesFeature[] getUsesFeatures()
          Returns the list of features in use found in the manifest.
 ManifestData.UsesLibrary[] getUsesLibraries()
          Returns the list of libraries in use found in the manifest.
 java.lang.Integer getVersionCode()
          Returns the versionCode value defined in the manifest, if found, null otherwise.
 void setMinSdkVersionString(java.lang.String minSdkVersion)
          Sets the value of the minSdkVersion attribute.
 void setTargetSdkVersionString(java.lang.String targetSdkVersion)
          Sets the value of the minSdkVersion attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIN_SDK_CODENAME

public static final int MIN_SDK_CODENAME
Value returned by getMinSdkVersion() when the value of the minSdkVersion attribute in the manifest is a codename and not an integer value.

See Also:
Constant Field Values

GL_ES_VERSION_NOT_SET

public static final int GL_ES_VERSION_NOT_SET
Value returned by getGlEsVersion() when there are no node with the attribute glEsVersion set.

See Also:
Constant Field Values
Constructor Detail

ManifestData

public ManifestData()
Method Detail

getPackage

public java.lang.String getPackage()
Returns the package defined in the manifest, if found.

Returns:
The package name or null if not found.

getVersionCode

public java.lang.Integer getVersionCode()
Returns the versionCode value defined in the manifest, if found, null otherwise.

Returns:
the versionCode or null if not found.

getActivities

public ManifestData.Activity[] getActivities()
Returns the list of activities found in the manifest.

Returns:
An array of fully qualified class names, or empty if no activity were found.

getLauncherActivity

public ManifestData.Activity getLauncherActivity()
Returns the name of one activity found in the manifest, that is configured to show up in the HOME screen.

Returns:
the fully qualified name of a HOME activity or null if none were found.

getProcesses

public java.lang.String[] getProcesses()
Returns the list of process names declared by the manifest.


getDebuggable

public java.lang.Boolean getDebuggable()
Returns the debuggable attribute value or null if it is not set.


getMinSdkVersionString

public java.lang.String getMinSdkVersionString()
Returns the minSdkVersion attribute, or null if it's not set.


setMinSdkVersionString

public void setMinSdkVersionString(java.lang.String minSdkVersion)
Sets the value of the minSdkVersion attribute.

Parameters:
minSdkVersion - the string value of the attribute in the manifest.

getMinSdkVersion

public int getMinSdkVersion()
Returns the minSdkVersion attribute, or 0 if it's not set or is a codename.

See Also:
getMinSdkVersionString()

setTargetSdkVersionString

public void setTargetSdkVersionString(java.lang.String targetSdkVersion)
Sets the value of the minSdkVersion attribute.

Parameters:
targetSdkVersion - the string value of the attribute in the manifest.

getTargetSdkVersion

public int getTargetSdkVersion()
Returns the targetSdkVersion attribute, or the same value as getMinSdkVersion() if it was not set in the manifest.


getInstrumentations

public ManifestData.Instrumentation[] getInstrumentations()
Returns the list of instrumentations found in the manifest.

Returns:
An array of ManifestData.Instrumentation, or empty if no instrumentations were found.

getUsesLibraries

public ManifestData.UsesLibrary[] getUsesLibraries()
Returns the list of libraries in use found in the manifest.

Returns:
An array of ManifestData.UsesLibrary objects, or empty if no libraries were found.

getUsesFeatures

public ManifestData.UsesFeature[] getUsesFeatures()
Returns the list of features in use found in the manifest.

Returns:
An array of ManifestData.UsesFeature objects, or empty if no libraries were found.

getGlEsVersion

public int getGlEsVersion()
Returns the glEsVersion from a or GL_ES_VERSION_NOT_SET if not set.


getSupportsScreensFromManifest

public ManifestData.SupportsScreens getSupportsScreensFromManifest()
Returns the ManifestData.SupportsScreens object representing the supports-screens node, or null if the node doesn't exist at all. Some values in the ManifestData.SupportsScreens instance maybe null, indicating that they were not present in the manifest. To get an instance that contains the values, as seen by the Android platform when the app is running, use getSupportsScreensValues().


getSupportsScreensValues

public ManifestData.SupportsScreens getSupportsScreensValues()
Returns an always non-null instance of ManifestData.SupportsScreens that's been initialized with the default values, and the values from the manifest. The default values depends on the manifest values for minSdkVersion and targetSdkVersion.


getUsesConfiguration

public ManifestData.UsesConfiguration getUsesConfiguration()
Returns the ManifestData.UsesConfiguration object representing the uses-configuration node, or null if the node doesn't exist at all.