blob: 74208cb3a5985b6e7b85958d80336669719d711d [file] [log] [blame]
<html devsite="true">
<head>
<title>CompositionGroup</title>
{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %}
{% include "_shared/_reference-head-tags.html" %}
</head>
<body>
<div id="metadata-info-block"></div>
<h1>CompositionGroup</h1>
<p>
<pre>interface <a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.html">CompositionGroup</a> : <a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionData.html">CompositionData</a></pre>
</p>
<hr>
<p><code><a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.html">CompositionGroup</a></code> is a group of data slots tracked independently by composition. These groups correspond to flow control branches (such as if statements and function calls) as well as emitting of a node to the tree.</p>
<p>This interface is not intended to be used directly and is provided to allow the tools API to have access to data tracked during composition. The tools API should be used instead which provides a more usable interpretation of the slot table.</p>
<h2>Summary</h2>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="100%"><h3>Public properties</h3></th>
</tr>
</thead>
<tbody class="list">
<tr>
<td width="40%"><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/index.html">Iterable</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?&gt;</code></td>
<td>
<div><code><a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.html#data()">data</a></code></div>
<p>The data stored in the slot table for this group.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a></code></td>
<td>
<div><code><a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.html#key()">key</a></code></div>
<p>A value used to identify the group within its siblings and is typically a compiler generated integer but can be an object if the <code><a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.html#key()">key</a></code> composable is used.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?</code></td>
<td>
<div><code><a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.html#node()">node</a></code></div>
<p>If the group represents a node this returns a non-null value which is the node that was emitted for the group.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?</code></td>
<td>
<div><code><a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.html#sourceInfo()">sourceInfo</a></code></div>
<p>Information recorded by the compiler to help tooling identify the source that generated the group.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="devsite-table-wrapper">
<table class="responsive" id="inhmethods">
<thead>
<tr>
<th colspan="100%"><h3>Inherited properties</h3></th>
</tr>
</thead>
<tbody class="list">
<tr>
<td><devsite-expandable><span class="expand-control">From <a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionData.html">androidx.compose.runtime.tooling.CompositionData</a></span>
<div class="devsite-table-wrapper">
<table class="responsive">
<tbody class="list">
<tr>
<td width="40%"><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/index.html">Iterable</a>&lt;<a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.html">CompositionGroup</a>&gt;</code></td>
<td>
<div><code><a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionData.html#compositionGroups()">compositionGroups</a></code></div>
<p>Iterate the composition data in the group.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td>
<div><code><a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionData.html#isEmpty()">isEmpty</a></code></div>
<p>Returns true if no composition data has been collected.</p>
</td>
</tr>
</tbody>
</table>
</div>
</devsite-expandable> </td>
</tr>
</tbody>
</table>
</div>
<h2>Public properties</h2>
<div><a name="getData()"></a><a name="setData()"></a><a name="getData--"></a><a name="setData--"></a>
<h3 class="api-name" id="data()">data</h3>
<pre class="api-signature no-pretty-print">val&nbsp;<a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.html#data()">data</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/index.html">Iterable</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?&gt;</pre>
<p>The data stored in the slot table for this group. This information includes the values stored for parameters that are checked for change, any value passed as a parameter for remember and the last value returned by remember, etc.</p>
</div>
<div><a name="getKey()"></a><a name="setKey()"></a><a name="getKey--"></a><a name="setKey--"></a>
<h3 class="api-name" id="key()">key</h3>
<pre class="api-signature no-pretty-print">val&nbsp;<a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.html#key()">key</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a></pre>
<p>A value used to identify the group within its siblings and is typically a compiler generated integer but can be an object if the <code><a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.html#key()">key</a></code> composable is used.</p>
</div>
<div><a name="getNode()"></a><a name="setNode()"></a><a name="getNode--"></a><a name="setNode--"></a>
<h3 class="api-name" id="node()">node</h3>
<pre class="api-signature no-pretty-print">val&nbsp;<a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.html#node()">node</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?</pre>
<p>If the group represents a node this returns a non-null value which is the node that was emitted for the group.</p>
</div>
<div><a name="getSourceInfo()"></a><a name="setSourceInfo()"></a><a name="getSourceInfo--"></a><a name="setSourceInfo--"></a>
<h3 class="api-name" id="sourceInfo()">sourceInfo</h3>
<pre class="api-signature no-pretty-print">val&nbsp;<a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.html#sourceInfo()">sourceInfo</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?</pre>
<p>Information recorded by the compiler to help tooling identify the source that generated the group. The format of this string is internal and is interpreted by the tools API which translates this information into source file name and offsets.</p>
</div>
</body>
</html>