fetch

fun fetch(): T

Resolves the matched window and returns it typed as T. This is the last resort, for a call only the matched window itself takes (e.g. a JFrame's extended state) or for its identity. To read a value, use assertProperty or an assertion.

Throws

if no single window matches.


@JvmName(name = "fetchOfType")
inline fun <R : Window> fetch(): R

Resolves the matched window and returns it typed as R, for a query that named no type of its own, or that named a wider one than the window to be driven. Like fetch, it is the last resort; assertProperty or an assertion reads a value.

val frame = onWindow().fetch<JFrame>()

Throws

if no single window matches, or if the matched window is not an R.