CompositionGroup


CompositionGroup 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.

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.

Summary

Public properties

Iterable<Any?>

The data stored in the slot table for this group.

Cmn
open Int

The total number of groups, including itself, that this group contains.

Cmn
open Any?

A value that identifies a Group independently of movement caused by recompositions.

Cmn
Any

A value used to identify the group within its siblings and is typically a compiler generated integer but can be an object if the key composable is used.

Cmn
Any?

If the group represents a node this returns a non-null value which is the node that was emitted for the group.

Cmn
open Int
Cmn
String?

Information recorded by the compiler to help tooling identify the source that generated the group.

Cmn

Extension functions

List<ParameterInformation>

Return the parameters found for this CompositionGroup.

android

Inherited functions

From androidx.compose.runtime.tooling.CompositionData
open CompositionGroup?
find(identityToFind: Any)

Find a sub-group by identity.

Cmn

Inherited properties

From androidx.compose.runtime.tooling.CompositionData
Iterable<CompositionGroup>

Iterate the composition data in the group.

Cmn
Boolean

Returns true if no composition data has been collected.

Cmn

Public properties

data

val dataIterable<Any?>

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 androidx.compose.runtime.remember and the last value returned by androidx.compose.runtime.remember, etc.

groupSize

open val groupSizeInt

The total number of groups, including itself, that this group contains.

identity

open val identityAny?

A value that identifies a Group independently of movement caused by recompositions.

key

val keyAny

A value used to identify the group within its siblings and is typically a compiler generated integer but can be an object if the key composable is used.

node

val nodeAny?

If the group represents a node this returns a non-null value which is the node that was emitted for the group.

slotsSize

open val slotsSizeInt

sourceInfo

val sourceInfoString?

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.

Extension functions

findParameters

@UiToolingDataApi
fun CompositionGroup.findParameters(cache: ContextCache? = null): List<ParameterInformation>

Return the parameters found for this CompositionGroup.