PackageInfoBuilder

public final class PackageInfoBuilder
extends Object

java.lang.Object
   ↳ androidx.test.core.content.pm.PackageInfoBuilder


Builder for PackageInfo.

Summary

Public methods

PackageInfo build()

Returns a PackageInfo with the provided data.

static PackageInfoBuilder newBuilder()

Start building a new PackageInfo.

PackageInfoBuilder setApplicationInfo(ApplicationInfo applicationInfo)

Sets the application info.

PackageInfoBuilder setPackageName(String packageName)

Sets the package name.

Inherited methods

Public methods

build

public PackageInfo build ()

Returns a PackageInfo with the provided data.

Returns
PackageInfo

newBuilder

public static PackageInfoBuilder newBuilder ()

Start building a new PackageInfo.

Returns
PackageInfoBuilder a new instance of PackageInfoBuilder.

setApplicationInfo

public PackageInfoBuilder setApplicationInfo (ApplicationInfo applicationInfo)

Sets the application info.

Default is null

Parameters
applicationInfo ApplicationInfo

Returns
PackageInfoBuilder

setPackageName

public PackageInfoBuilder setPackageName (String packageName)

Sets the package name.

Default is null.

Parameters
packageName String

Returns
PackageInfoBuilder