blob: 74208cb3a5985b6e7b85958d80336669719d711d [file] [log] [blame]
Tiem Song6fed3de2021-06-14 14:48:10 -07001<html devsite="true">
2 <head>
3 <title>CompositionGroup</title>
4{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %}
5{% include "_shared/_reference-head-tags.html" %}
6 </head>
7 <body>
Tiem Song6f896de2022-11-03 14:55:52 -07008 <div id="metadata-info-block"></div>
Tiem Song6fed3de2021-06-14 14:48:10 -07009 <h1>CompositionGroup</h1>
Tiem Song6fed3de2021-06-14 14:48:10 -070010 <p>
Owen Gray22f20572022-08-08 13:48:02 -040011 <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>
Tiem Song6fed3de2021-06-14 14:48:10 -070012 </p>
13 <hr>
14 <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>
15 <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>
16 <h2>Summary</h2>
17 <div class="devsite-table-wrapper">
18 <table class="responsive">
19 <thead>
20 <tr>
Andrea Falcone80f1a8f2022-08-23 11:22:33 -040021 <th colspan="100%"><h3>Public properties</h3></th>
Tiem Song6fed3de2021-06-14 14:48:10 -070022 </tr>
23 </thead>
Andrea Falcone80f1a8f2022-08-23 11:22:33 -040024 <tbody class="list">
Tiem Song6fed3de2021-06-14 14:48:10 -070025 <tr>
Tiem Song6fed3de2021-06-14 14:48:10 -070026 <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>
27 <td>
28 <div><code><a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.html#data()">data</a></code></div>
29 <p>The data stored in the slot table for this group.</p>
30 </td>
31 </tr>
32 <tr>
Tiem Song6fed3de2021-06-14 14:48:10 -070033 <td width="40%"><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a></code></td>
34 <td>
35 <div><code><a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.html#key()">key</a></code></div>
36 <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>
37 </td>
38 </tr>
39 <tr>
40 <td width="40%"><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?</code></td>
41 <td>
42 <div><code><a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.html#node()">node</a></code></div>
43 <p>If the group represents a node this returns a non-null value which is the node that was emitted for the group.</p>
44 </td>
45 </tr>
46 <tr>
47 <td width="40%"><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?</code></td>
48 <td>
49 <div><code><a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.html#sourceInfo()">sourceInfo</a></code></div>
50 <p>Information recorded by the compiler to help tooling identify the source that generated the group.</p>
51 </td>
52 </tr>
53 </tbody>
54 </table>
55 </div>
Paweł Marks27466ca2022-02-04 22:04:42 +010056 <div class="devsite-table-wrapper">
57 <table class="responsive" id="inhmethods">
58 <thead>
59 <tr>
Andrea Falcone80f1a8f2022-08-23 11:22:33 -040060 <th colspan="100%"><h3>Inherited properties</h3></th>
Paweł Marks27466ca2022-02-04 22:04:42 +010061 </tr>
62 </thead>
Andrea Falcone80f1a8f2022-08-23 11:22:33 -040063 <tbody class="list">
Paweł Marks27466ca2022-02-04 22:04:42 +010064 <tr>
Owen Graybbefee12022-09-14 08:09:05 -040065 <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>
Paweł Marks27466ca2022-02-04 22:04:42 +010066 <div class="devsite-table-wrapper">
67 <table class="responsive">
Andrea Falcone80f1a8f2022-08-23 11:22:33 -040068 <tbody class="list">
Paweł Marks27466ca2022-02-04 22:04:42 +010069 <tr>
70 <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>
71 <td>
72 <div><code><a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionData.html#compositionGroups()">compositionGroups</a></code></div>
73 <p>Iterate the composition data in the group.</p>
74 </td>
75 </tr>
76 <tr>
77 <td width="40%"><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
78 <td>
79 <div><code><a href="/reference/kotlin/androidx/compose/runtime/tooling/CompositionData.html#isEmpty()">isEmpty</a></code></div>
80 <p>Returns true if no composition data has been collected.</p>
81 </td>
82 </tr>
83 </tbody>
84 </table>
85 </div>
86</devsite-expandable> </td>
87 </tr>
88 </tbody>
89 </table>
90 </div>
Tiem Song6fed3de2021-06-14 14:48:10 -070091 <h2>Public properties</h2>
Tiem Song6fed3de2021-06-14 14:48:10 -070092 <div><a name="getData()"></a><a name="setData()"></a><a name="getData--"></a><a name="setData--"></a>
93 <h3 class="api-name" id="data()">data</h3>
94 <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>
Fred Sladkey0f684c32021-08-02 15:06:14 -040095 <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>
Tiem Song6fed3de2021-06-14 14:48:10 -070096 </div>
Tiem Song6fed3de2021-06-14 14:48:10 -070097 <div><a name="getKey()"></a><a name="setKey()"></a><a name="getKey--"></a><a name="setKey--"></a>
98 <h3 class="api-name" id="key()">key</h3>
99 <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>
100 <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>
101 </div>
102 <div><a name="getNode()"></a><a name="setNode()"></a><a name="getNode--"></a><a name="setNode--"></a>
103 <h3 class="api-name" id="node()">node</h3>
104 <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>
105 <p>If the group represents a node this returns a non-null value which is the node that was emitted for the group.</p>
106 </div>
107 <div><a name="getSourceInfo()"></a><a name="setSourceInfo()"></a><a name="getSourceInfo--"></a><a name="setSourceInfo--"></a>
108 <h3 class="api-name" id="sourceInfo()">sourceInfo</h3>
109 <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>
110 <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>
111 </div>
112 </body>
113</html>