com.android.builder.core
Class ApkInfoParser

java.lang.Object
  extended by com.android.builder.core.ApkInfoParser

public class ApkInfoParser
extends java.lang.Object

Class to parse an APK with aapt to gather information


Nested Class Summary
static class ApkInfoParser.ApkInfo
          Information about an APK
 
Constructor Summary
ApkInfoParser(java.io.File aaptFile, com.android.ide.common.internal.CommandLineRunner commandLineRunner)
          Constructs a new parser
 
Method Summary
 ApkInfoParser.ApkInfo parseApk(java.io.File apkFile)
          Computes and returns the info for an APK
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApkInfoParser

public ApkInfoParser(@NonNull
                     java.io.File aaptFile,
                     @NonNull
                     com.android.ide.common.internal.CommandLineRunner commandLineRunner)
Constructs a new parser

Parameters:
aaptFile - aapt file to use to gather the info
commandLineRunner - a command line runner to call aapt
Method Detail

parseApk

@NonNull
public ApkInfoParser.ApkInfo parseApk(@NonNull
                                              java.io.File apkFile)
                               throws java.lang.InterruptedException,
                                      com.android.ide.common.internal.LoggedErrorException,
                                      java.io.IOException
Computes and returns the info for an APK

Parameters:
apkFile - the APK to parse
Returns:
a non-null ApkInfo object.
Throws:
java.lang.InterruptedException
com.android.ide.common.internal.LoggedErrorException
java.io.IOException