{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

PackageInfoBuilder

public final class PackageInfoBuilder


Builder for PackageInfo.

Summary

Public methods

@NonNull PackageInfo

Returns a PackageInfo with the provided data.

static @NonNull PackageInfoBuilder

Start building a new PackageInfo.

@NonNull PackageInfoBuilder
setApplicationInfo(@NonNull ApplicationInfo applicationInfo)

Sets the application info.

@NonNull PackageInfoBuilder

Sets the package name.

Public methods

build

@NonNull
public PackageInfo build()

Returns a PackageInfo with the provided data.

newBuilder

@NonNull
public static PackageInfoBuilder newBuilder()

Start building a new PackageInfo.

Returns
PackageInfoBuilder

a new instance of PackageInfoBuilder.

setApplicationInfo

@NonNull
public PackageInfoBuilder setApplicationInfo(@NonNull ApplicationInfo applicationInfo)

Sets the application info.

Default is null

See also
PackageInfo

android.content.pm.PackageInfo#applicationInfo

setPackageName

@NonNull
public PackageInfoBuilder setPackageName(@NonNull String packageName)

Sets the package name.

Default is null.

See also
PackageInfo

android.content.pm.PackageInfo#packageName