Skip to content

IStateGuardBackend

interface IStateGuardBackend
Extends: ISnapshotBackend
Known subtypes: GlStateGuardBackend
Package: dev.joid.test.contract · Module: tool-testkit · Source: IStateGuardBackend.java

A snapshot backend that can draw and set state like a host, for the state guard suite.

ReturnsSignatureSummary
voiddrawExternal() abstractDraws something with the API directly, as a host does, and changes state on the way.
voidinject(StateTrap trap) abstractSets that trap in the state of the context, as a host would leave it before a frame.
booleansupports(StateTrap trap) abstractIf true, the context can set that trap; the suite skips the traps it cannot set.
voidfill(int x, int y, int width, int height, int color) abstractFills that rectangle of the current target with that ARGB color through the API directly, from the bottom-left corner.
Map<String,String>readState() abstractReturns the state of the context that the guard must preserve, by name, to compare at each step.

void drawExternal() abstract

Draws something with the API directly, as a host does, and changes state on the way.

void inject(StateTrap trap) abstract

Sets that trap in the state of the context, as a host would leave it before a frame.

boolean supports(StateTrap trap) abstract

If true, the context can set that trap; the suite skips the traps it cannot set.

void fill(int x, int y, int width, int height, int color) abstract

Fills that rectangle of the current target with that ARGB color through the API directly, from the bottom-left corner.

Map<String,String> readState() abstract

Returns the state of the context that the guard must preserve, by name, to compare at each step.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page