# Bindable

# Bindable

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/test/espresso/remote/Bindable "View this page in Java")

<br />

```
interface Bindable
```

<br />

*** ** * ** ***

Interface that can be implemented by classes that provide an[IBinder](https://developer.android.com/reference/android/os/IBinder.html).

## Summary

|                                 ### Public functions                                 |
|--------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [IBinder](https://developer.android.com/reference/android/os/IBinder.html)`!`        | [getIBinder](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/Bindable#getIBinder())`()`                                                                                                                                                                                                                     |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [getId](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/Bindable#getId())`()`                                                                                                                                                                                                                               |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)        | [setIBinder](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/Bindable#setIBinder(android.os.IBinder))`(binder: `[IBinder](https://developer.android.com/reference/android/os/IBinder.html)`!)` Sets the[IBinder](https://developer.android.com/reference/android/os/IBinder.html)of the implementing class. |

## Public functions

### getIBinder

```
fun getIBinder(): IBinder!
```  

|                                    Returns                                    |
|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|
| [IBinder](https://developer.android.com/reference/android/os/IBinder.html)`!` | the[IBinder](https://developer.android.com/reference/android/os/IBinder.html)of the implementing class. |

### getId

```
fun getId(): String!
```  

|                                       Returns                                        |
|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | the id of the[Bindable](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/Bindable)class. |

### setIBinder

```
fun setIBinder(binder: IBinder!): Unit
```

Sets the[IBinder](https://developer.android.com/reference/android/os/IBinder.html)of the implementing class.  

|                                       Parameters                                        |
|-----------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|
| `binder: `[IBinder](https://developer.android.com/reference/android/os/IBinder.html)`!` | the[IBinder](https://developer.android.com/reference/android/os/IBinder.html) |