{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

CompositionData

public interface CompositionData

Known direct subclasses
CompositionGroup

CompositionGroup is a group of data slots tracked independently by composition.


A CompositionData is the data tracked by the composer during composition.

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 methods

default CompositionGroup
find(@NonNull Object identityToFind)

Find a sub-group by identity.

abstract @NonNull Iterable<@NonNull CompositionGroup>

Iterate the composition data in the group.

abstract boolean

Returns true if no composition data has been collected.

Public methods

find

default CompositionGroup find(@NonNull Object identityToFind)

Find a sub-group by identity. Returns null if the group is not found or the implementation of this interface does not support finding groups by their identity. In other words, a null result from this method should not be interpreted as the identity is not a group in the composition data.

getCompositionGroups

abstract @NonNull Iterable<@NonNull CompositionGroupgetCompositionGroups()

Iterate the composition data in the group. The composition data is structured as a tree of values that corresponds to the call graph of the functions that produced the tree. Interspersed are groups that represents the nodes themselves.

isEmpty

abstract boolean isEmpty()

Returns true if no composition data has been collected. This occurs when the first composition into this composition data has not completed yet or, if it is a group, it doesn't contain any child groups.