# BoundDynamicType

# BoundDynamicType

Artifact:[androidx.wear.protolayout:protolayout-expression-pipeline](https://developer.android.com/jetpack/androidx/releases/wear-protolayout)  
[View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/expression/pipeline/BoundDynamicType.java+class:androidx.wear.protolayout.expression.pipeline.BoundDynamicType)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/protolayout/expression/pipeline/BoundDynamicType "View this page in Java")

<br />

```
interface BoundDynamicType : AutoCloseable
```

<br />

*** ** * ** ***

An object representing a dynamic type that is being prepared for evaluation by[bind](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/pipeline/DynamicTypeEvaluator#bind(androidx.wear.protolayout.expression.pipeline.DynamicTypeBindingRequest)).

In order for evaluation and sending values to start,[startEvaluation](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/pipeline/BoundDynamicType#startEvaluation())needs to be called.

To stop the evaluation, this object should be closed with[close](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/pipeline/BoundDynamicType#close()).

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | `@`[UiThread](https://developer.android.com/reference/kotlin/androidx/annotation/UiThread) [close](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/pipeline/BoundDynamicType#close())`()` Destroys this dynamic type and it shouldn't be used after this.                                                                                                                                                                                                                                                  |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | `@`[UiThread](https://developer.android.com/reference/kotlin/androidx/annotation/UiThread) [startEvaluation](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/pipeline/BoundDynamicType#startEvaluation())`()` Starts evaluating this dynamic type that was previously bound with any of the[bind](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/pipeline/DynamicTypeEvaluator#bind(androidx.wear.protolayout.expression.pipeline.DynamicTypeBindingRequest))methods. |

## Public functions

### close

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
@UiThread
fun close(): Unit
```

Destroys this dynamic type and it shouldn't be used after this.  

### startEvaluation

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
@UiThread
fun startEvaluation(): Unit
```

Starts evaluating this dynamic type that was previously bound with any of the[bind](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/pipeline/DynamicTypeEvaluator#bind(androidx.wear.protolayout.expression.pipeline.DynamicTypeBindingRequest))methods.

It's the callers responsibility to destroy those dynamic types after use, with[close](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/pipeline/BoundDynamicType#close()).