com.android.builder.core
Class DefaultManifestParser

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

public class DefaultManifestParser
extends java.lang.Object
implements ManifestParser


Constructor Summary
DefaultManifestParser()
           
 
Method Summary
 java.lang.Object 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.
 java.lang.Object 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 java.lang.Object getMinSdkVersion(@NonNull
                                         java.io.File manifestFile)
Description copied from interface: ManifestParser
Returns the minSdkVersion parsed from the given manifest file. The returned value can be an Integer or a String

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

getTargetSdkVersion

public java.lang.Object getTargetSdkVersion(@NonNull
                                            java.io.File manifestFile)
Description copied from interface: ManifestParser
Returns the targetSdkVersion parsed from the given manifest file. The returned value can be an Integer or a String

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