---
title: "SemanticsConfiguration"
description: "Describes the semantic information associated with the owning component

The information provided in the configuration is used to to generate the semantics tree."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
class SemanticsConfiguration :
    SemanticsPropertyReceiver, Iterable<Map.Entry<SemanticsPropertyKey<*>, Any?>>
```


Describes the semantic information associated with the owning component

The information provided in the configuration is used to to generate the semantics tree.


## Properties

<div class='sourceset sourceset-common'>Common</div>


```kotlin
var isMergingSemanticsOfDescendants: Boolean
```


Whether the semantic information provided by the owning component and all of its descendants
should be treated as one logical entity.

If set to true, the descendants of the owning component's `SemanticsNode` will merge their
semantic information into the `SemanticsNode` representing the owning component.



<div class='sourceset sourceset-common'>Common</div>


```kotlin
var isClearingSemantics: Boolean
```


## Functions

```kotlin
operator fun <T> get(key: SemanticsPropertyKey<T>): T
```


Retrieves the value for the given property, if one has been set. If a value has not been set,
throws `IllegalStateException`


```kotlin
fun <T> getOrElse(key: SemanticsPropertyKey<T>, defaultValue: () -> T): T
```

```kotlin
fun <T> getOrElseNullable(key: SemanticsPropertyKey<T>, defaultValue: () -> T?): T?
```

```kotlin
operator fun <T> contains(key: SemanticsPropertyKey<T>): Boolean
```

```kotlin
fun copy(): SemanticsConfiguration
```


Returns an exact copy of this configuration.



