androidx.compose.ui.tooling.data

Interfaces

SourceContext

Context with data for creating group nodes.

Classes

CallGroup

A group that represents the invocation of a component

ContextCache

A cache of SourceInformationContext that optionally can be specified when using mapTree.

Group

A group in the slot table.

JoinedKey

A key that has being joined together to form one key.

NodeGroup

A group that represents an emitted node

ParameterInformation
SourceLocation

Source location of the call that produced the call group.

Annotations

Extension functions summary

Group

Return a group tree for for the slot table that represents the entire content of the slot table.

List<ParameterInformation>

Return the parameters found for this CompositionGroup.

T?
@UiToolingDataApi
<T : Any?> CompositionData.mapTree(
    factory: (CompositionGroup, SourceContext, List<T>) -> T?,
    cache: ContextCache
)

Return a tree of custom nodes for the slot table.

Extension properties summary

String?

The source position of the group extracted from the key, if one exists for the group.

Extension functions

@UiToolingDataApi
fun CompositionData.asTree(): Group

Return a group tree for for the slot table that represents the entire content of the slot table.

findParameters

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

Return the parameters found for this CompositionGroup.

@UiToolingDataApi
fun <T : Any?> CompositionData.mapTree(
    factory: (CompositionGroup, SourceContext, List<T>) -> T?,
    cache: ContextCache = ContextCache()
): T?

Return a tree of custom nodes for the slot table.

The factory method will be called for every CompositionGroup in the slot tree and can be used to create custom nodes based on the passed arguments. The SourceContext argument gives access to additional information encoded in the CompositionGroup.sourceInfo. A return of null from factory means that the entire subtree will be ignored.

A cache can optionally be specified. If a client is calling mapTree multiple times, this can save some time if the values of CompositionGroup.sourceInfo are not unique.

Extension properties

@UiToolingDataApi
val Group.positionString?

The source position of the group extracted from the key, if one exists for the group.