SwingCompositionDiagnostics

The debug-only checks the compositions on one recomposer are held to, installed as an element of the coroutine context that recomposer was built over.

A composition reads it as it is mounted, and one nested under it reads the same element through its parent's effect context - a cell renderer's composition, a menu's, a window's. Nothing installs one in production.

Every call runs on the event dispatch thread, from inside the change pass that provoked it. A violation is reported rather than thrown: a throw from inside a modifier write reaches the apply phase and ends the recomposer for good.

Marked InternalSwingUiApi; it may change or be removed without notice in any release.

Types

Link copied to clipboard

The key this element is read off a coroutine context by.

Properties

Link copied to clipboard
open override val key: CoroutineContext.Key<*>

Functions

Link copied to clipboard
abstract fun declaring(info: ModifierInfo, write: () -> Unit)

Reads info, then invokes write exactly once before returning.

Link copied to clipboard
open override fun <R> fold(initial: R, operation: (R, CoroutineContext.Element) -> R): R
Link copied to clipboard
open operator override fun <E : CoroutineContext.Element> get(key: CoroutineContext.Key<E>): E?
Link copied to clipboard
open override fun minusKey(key: CoroutineContext.Key<*>): CoroutineContext
Link copied to clipboard
open operator fun plus(context: CoroutineContext): CoroutineContext
Link copied to clipboard
abstract fun restoring(info: ModifierInfo, restore: () -> Unit)

Reads info, then invokes restore exactly once before returning, putting the component back where the departing declaration found it.