com.android.builder
Class DefaultManifestParser

java.lang.Object
  extended by com.android.builder.DefaultManifestParser
All Implemented Interfaces:
ManifestParser

public class DefaultManifestParser
extends java.lang.Object
implements ManifestParser


Constructor Summary
DefaultManifestParser()
           
 
Method Summary
 int getMinSdkVersion(java.io.File manifestFile)
          Returns the minSdkVersion parsed from the given manifest file.
 java.lang.String getPackage(java.io.File manifestFile)
          Returns the package name parsed from the given manifest file.
 int getTargetSdkVersion(java.io.File manifestFile)
          Returns the targetSdkVersion parsed from the given manifest file.
 int getVersionCode(java.io.File manifestFile)
          Returns the version code parsed from the given manifest file.
 java.lang.String getVersionName(java.io.File manifestFile)
          Returns the version name parsed from the given manifest file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultManifestParser

public DefaultManifestParser()
Method Detail

getPackage

@Nullable
public java.lang.String getPackage(@NonNull
                                            java.io.File manifestFile)
Description copied from interface: ManifestParser
Returns the package name parsed from the given manifest file.

Specified by:
getPackage in interface ManifestParser
Parameters:
manifestFile - the manifest file to parse
Returns:
the package name or null if not found.

getVersionName

@Nullable
public java.lang.String getVersionName(@NonNull
                                                java.io.File manifestFile)
Description copied from interface: ManifestParser
Returns the version name parsed from the given manifest file.

Specified by:
getVersionName in interface ManifestParser
Parameters:
manifestFile - the manifest file to parse
Returns:
the version name or null if not found.

getVersionCode

public int getVersionCode(@NonNull
                          java.io.File manifestFile)
Description copied from interface: ManifestParser
Returns the version code parsed from the given manifest file.

Specified by:
getVersionCode in interface ManifestParser
Parameters:
manifestFile - the manifest file to parse
Returns:
the version code or -1 if not found.

getMinSdkVersion

public int getMinSdkVersion(@NonNull
                            java.io.File manifestFile)
Description copied from interface: ManifestParser
Returns the minSdkVersion parsed from the given manifest file.

Specified by:
getMinSdkVersion in interface ManifestParser
Parameters:
manifestFile - the manifest file to parse
Returns:
the minSdkVersion or 1 if not found.

getTargetSdkVersion

public int getTargetSdkVersion(@NonNull
                               java.io.File manifestFile)
Description copied from interface: ManifestParser
Returns the targetSdkVersion parsed from the given manifest file.

Specified by:
getTargetSdkVersion in interface ManifestParser
Parameters:
manifestFile - the manifest file to parse
Returns:
the targetSdkVersion or -1 if not found.