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.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
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. |
Method details
Section titled “Method details”drawExternal
Section titled “drawExternal”void drawExternal() abstract
Draws something with the API directly, as a host does, and changes state on the way.
inject
Section titled “inject”void inject(StateTrap trap) abstract
Sets that trap in the state of the context, as a host would leave it before a frame.
supports
Section titled “supports”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.
readState
Section titled “readState”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
