Package com.android.testutils.apk
Class Aar
- java.lang.Object
-
- com.android.testutils.apk.Zip
-
- com.android.testutils.apk.AndroidArchive
-
- com.android.testutils.apk.Aar
-
- All Implemented Interfaces:
java.lang.AutoCloseable
@Immutable public final class Aar extends AndroidArchive
-
-
Field Summary
-
Fields inherited from class com.android.testutils.apk.AndroidArchive
CLASS_FORMAT
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsMainClass(java.lang.String name)booleancontainsSecondaryClass(java.lang.String name)java.lang.StringgetAndroidManifestContentsAsString()Returns the contents of the AAR's AndroidManifest.xml entry as a String; returns null if the AAR doesn't have an AndroidManifest.xml entry.java.nio.file.PathgetJavaResource(java.lang.String name)java.lang.StringtoString()-
Methods inherited from class com.android.testutils.apk.AndroidArchive
checkValidClassName, containsClass, getResource
-
Methods inherited from class com.android.testutils.apk.Zip
close, exists, getEntries, getEntries, getEntry, getEntryAsZip, getFile
-
-
-
-
Method Detail
-
containsMainClass
public boolean containsMainClass(@NonNull java.lang.String name) throws java.io.IOException- Specified by:
containsMainClassin classAndroidArchive- Throws:
java.io.IOException
-
containsSecondaryClass
public boolean containsSecondaryClass(@NonNull java.lang.String name) throws java.io.IOException- Specified by:
containsSecondaryClassin classAndroidArchive- Throws:
java.io.IOException
-
getJavaResource
@Nullable public java.nio.file.Path getJavaResource(@NonNull java.lang.String name) throws java.io.IOException- Specified by:
getJavaResourcein classAndroidArchive- Throws:
java.io.IOException
-
getAndroidManifestContentsAsString
@Nullable public java.lang.String getAndroidManifestContentsAsString() throws java.io.IOExceptionReturns the contents of the AAR's AndroidManifest.xml entry as a String; returns null if the AAR doesn't have an AndroidManifest.xml entry.- Throws:
java.io.IOException
-
-