# BuiltInTypeConverters

Artifact: [androidx.room:room-common](https://developer.android.com/jetpack/androidx/releases/room) [View Source](https://cs.android.com/search?q=file:androidx/room/BuiltInTypeConverters.kt+class:androidx.room.BuiltInTypeConverters) Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/room#2.4.0)

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOSJavaScript
- Cmn

  ```
  @Target(allowedTargets = )
  @Retention(value = AnnotationRetention.BINARY)
  annotation BuiltInTypeConverters
  ```

*** ** * ** ***

Flags to turn on/off extra type converters provided by Room.

For certain commonly used types (enums, UUID), Room provides automatic type converters. By default, these type converters are enabled but have lower priority than user provided type converters.

You can set these flags in the `https://developer.android.com/reference/kotlin/androidx/room/TypeConverters` annotation to turn them off / on. It might be useful if you want to have more strict control over how these types are saved into the database.

## Summary

| ### Nested types |
|---|
| `enum https://developer.android.com/reference/kotlin/androidx/room/BuiltInTypeConverters.State : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-enum/index.html<https://developer.android.com/reference/kotlin/androidx/room/BuiltInTypeConverters.State>` Control flags for built in converters. |

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/room/BuiltInTypeConverters#BuiltInTypeConverters(androidx.room.BuiltInTypeConverters.State,androidx.room.BuiltInTypeConverters.State,androidx.room.BuiltInTypeConverters.State)( enums: https://developer.android.com/reference/kotlin/androidx/room/BuiltInTypeConverters.State, uuid: https://developer.android.com/reference/kotlin/androidx/room/BuiltInTypeConverters.State, byteBuffer: https://developer.android.com/reference/kotlin/androidx/room/BuiltInTypeConverters.State )` | Cmn |

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/room/BuiltInTypeConverters.State` | `https://developer.android.com/reference/kotlin/androidx/room/BuiltInTypeConverters#byteBuffer()` Controls whether Room can generate a TypeConverter for java.nio.ByteBuffer and use its `ByteBuffer` representation while saving it into database. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/room/BuiltInTypeConverters.State` | `https://developer.android.com/reference/kotlin/androidx/room/BuiltInTypeConverters#enums()` Controls whether Room can generate a TypeConverter for enum types and use their `name()` in the database. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/room/BuiltInTypeConverters.State` | `https://developer.android.com/reference/kotlin/androidx/room/BuiltInTypeConverters#uuid()` Controls whether Room can generate a TypeConverter for java.util.UUID and use its `byte[]` representation while saving it into database. | Cmn |

## Public constructors

### BuiltInTypeConverters

Cmn Added in [2.8.5](https://developer.android.com/jetpack/androidx/releases/room#2.8.5)

```
BuiltInTypeConverters(
    enums: BuiltInTypeConverters.State = State.INHERITED,
    uuid: BuiltInTypeConverters.State = State.INHERITED,
    byteBuffer: BuiltInTypeConverters.State = State.INHERITED
)
```

## Public properties

### byteBuffer

Cmn

```
val byteBuffer: BuiltInTypeConverters.State
```

Controls whether Room can generate a TypeConverter for java.nio.ByteBuffer and use its `ByteBuffer` representation while saving it into database.

By default, it is set to `https://developer.android.com/reference/kotlin/androidx/room/BuiltInTypeConverters.State#INHERITED` (on by default unless set to another value in a higher scope).

### enums

Cmn

```
val enums: BuiltInTypeConverters.State
```

Controls whether Room can generate a TypeConverter for enum types and use their `name()` in the database.

By default, it is set to `https://developer.android.com/reference/kotlin/androidx/room/BuiltInTypeConverters.State#INHERITED` (on by default unless set to another value in a higher scope).

### uuid

Cmn

```
val uuid: BuiltInTypeConverters.State
```

Controls whether Room can generate a TypeConverter for java.util.UUID and use its `byte[]` representation while saving it into database.

By default, it is set to `https://developer.android.com/reference/kotlin/androidx/room/BuiltInTypeConverters.State#INHERITED` (on by default unless set to another value in a higher scope).