# ApplicationInfoBuilder

Artifact: [androidx.test:core](https://developer.android.com/jetpack/androidx/releases/test) [View Source](https://cs.android.com/search?q=file:androidx/test/core/content/pm/ApplicationInfoBuilder.java+class:androidx.test.core.content.pm.ApplicationInfoBuilder)

*** ** * ** ***


```
public final class ApplicationInfoBuilder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/android/content/pm/ApplicationInfo.html`.

## Summary

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/android/content/pm/ApplicationInfo.html` | `https://developer.android.com/reference/androidx/test/core/content/pm/ApplicationInfoBuilder#build()()` Returns a `https://developer.android.com/reference/android/content/pm/ApplicationInfo.html` with the provided data. |
| `static https://developer.android.com/reference/androidx/test/core/content/pm/ApplicationInfoBuilder` | `https://developer.android.com/reference/androidx/test/core/content/pm/ApplicationInfoBuilder#newBuilder()()` Start building a new `https://developer.android.com/reference/android/content/pm/ApplicationInfo.html`. |
| `https://developer.android.com/reference/androidx/test/core/content/pm/ApplicationInfoBuilder` | `https://developer.android.com/reference/androidx/test/core/content/pm/ApplicationInfoBuilder#setFlags(int)(int flags)` Sets the flags. |
| `https://developer.android.com/reference/androidx/test/core/content/pm/ApplicationInfoBuilder` | `https://developer.android.com/reference/androidx/test/core/content/pm/ApplicationInfoBuilder#setName(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html name)` Sets the name. |
| `https://developer.android.com/reference/androidx/test/core/content/pm/ApplicationInfoBuilder` | `https://developer.android.com/reference/androidx/test/core/content/pm/ApplicationInfoBuilder#setPackageName(java.lang.String)(https://developer.android.com/reference/java/lang/String.html packageName)` Sets the packageName. |

## Public methods

### build

```
public ApplicationInfo build()
```

Returns a `https://developer.android.com/reference/android/content/pm/ApplicationInfo.html` with the provided data.

### newBuilder

```
public static ApplicationInfoBuilder newBuilder()
```

Start building a new `https://developer.android.com/reference/android/content/pm/ApplicationInfo.html`.

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/test/core/content/pm/ApplicationInfoBuilder` | a new instance of `https://developer.android.com/reference/androidx/test/core/content/pm/ApplicationInfoBuilder`. |

### setFlags

```
public ApplicationInfoBuilder setFlags(int flags)
```

Sets the flags.

| See also |
|---|---|
| `https://developer.android.com/reference/android/content/pm/ApplicationInfo.html#flags` |   |

### setName

```
public ApplicationInfoBuilder setName(@Nullable String name)
```

Sets the name.

Default is `null`.

| See also |
|---|---|
| `https://developer.android.com/reference/android/content/pm/PackageItemInfo.html#name` |   |

### setPackageName

```
public ApplicationInfoBuilder setPackageName(String packageName)
```

Sets the packageName.

| See also |
|---|---|
| `https://developer.android.com/reference/android/content/pm/PackageItemInfo.html#packageName` |   |