# 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)

*** ** * ** ***


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

<br />

*** ** * ** ***

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/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 |
|---|
| `public enum https://developer.android.com/reference/androidx/room/BuiltInTypeConverters.State extends https://developer.android.com/reference/java/lang/Enum.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/room/BuiltInTypeConverters.State>` Control flags for built in converters. |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/room/BuiltInTypeConverters.State` | `https://developer.android.com/reference/androidx/room/BuiltInTypeConverters#getByteBuffer()()` Controls whether Room can generate a TypeConverter for java.nio.ByteBuffer and use its `ByteBuffer` representation while saving it into database. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/room/BuiltInTypeConverters.State` | `https://developer.android.com/reference/androidx/room/BuiltInTypeConverters#getEnums()()` Controls whether Room can generate a TypeConverter for enum types and use their `name()` in the database. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/room/BuiltInTypeConverters.State` | `https://developer.android.com/reference/androidx/room/BuiltInTypeConverters#getUuid()()` Controls whether Room can generate a TypeConverter for java.util.UUID and use its `byte[]` representation while saving it into database. |

## Public methods

### getByteBuffer

```
public final @NonNull BuiltInTypeConverters.State getByteBuffer()
```

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/androidx/room/BuiltInTypeConverters.State#INHERITED` (on by default unless set to another value in a higher scope).

### getEnums

```
public final @NonNull BuiltInTypeConverters.State getEnums()
```

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/androidx/room/BuiltInTypeConverters.State#INHERITED` (on by default unless set to another value in a higher scope).

### getUuid

```
public final @NonNull BuiltInTypeConverters.State getUuid()
```

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/androidx/room/BuiltInTypeConverters.State#INHERITED` (on by default unless set to another value in a higher scope).