# IntentStubberRegistry

# IntentStubberRegistry

Artifact:[androidx.test:monitor](https://developer.android.com/jetpack/androidx/releases/test)  
[View Source](https://cs.android.com/search?q=file:androidx/test/runner/intent/IntentStubberRegistry.java+class:androidx.test.runner.intent.IntentStubberRegistry)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/test/runner/intent/IntentStubberRegistry "View this page in Java")

<br />

```
class IntentStubberRegistry
```

<br />

*** ** * ** ***

Exposes an implementation of[IntentStubber](https://developer.android.com/reference/kotlin/androidx/test/runner/intent/IntentStubber).

## Summary

|                                           ### Public functions                                           |
|----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)        | [isLoaded](https://developer.android.com/reference/kotlin/androidx/test/runner/intent/IntentStubberRegistry#isLoaded())`()`                                                                                                                                                                                                                                                                                                  |
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)              | [load](https://developer.android.com/reference/kotlin/androidx/test/runner/intent/IntentStubberRegistry#load(androidx.test.runner.intent.IntentStubber))`(intentStubber: `[IntentStubber](https://developer.android.com/reference/kotlin/androidx/test/runner/intent/IntentStubber)`!)` Loads an[IntentStubber](https://developer.android.com/reference/kotlin/androidx/test/runner/intent/IntentStubber)into this registry. |
| `synchronized java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [reset](https://developer.android.com/reference/kotlin/androidx/test/runner/intent/IntentStubberRegistry#reset())`()` Clears the current instance of Intent Stubber.                                                                                                                                                                                                                                                         |

|                                                   ### Public properties                                                    |
|----------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|
| `java-static `[IntentStubber](https://developer.android.com/reference/kotlin/androidx/test/runner/intent/IntentStubber)`!` | [instance](https://developer.android.com/reference/kotlin/androidx/test/runner/intent/IntentStubberRegistry#instance()) |

## Public functions

### isLoaded

```
java-static fun isLoaded(): Boolean
```  

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | if an[IntentStubber](https://developer.android.com/reference/kotlin/androidx/test/runner/intent/IntentStubber)has been loaded. |

### load

```
java-static fun load(intentStubber: IntentStubber!): Unit
```

Loads an[IntentStubber](https://developer.android.com/reference/kotlin/androidx/test/runner/intent/IntentStubber)into this registry. There can only be one active stubber at a time.

Calling this method multiple times in the same instrumentation will result in an exception.

This method can be called from any thread.  

### reset

```
synchronized java-static fun reset(): Unit
```

Clears the current instance of Intent Stubber.  

## Public properties

### instance

```
java-static val instance: IntentStubber!
```