Skip to content

UIPropertyHook

final class UIPropertyHook
Package: dev.joid.lib.ui.core.hook.property · Module: core · Source: UIPropertyHook.java

Reads and writes the @UIProperty fields of a UI in its property file.

JOID calls it for you when a UI opens, reloads and closes, and when the JVM stops. A field that cannot be read keeps its default value, and a field that cannot be saved keeps its previous value in the file; both print a warning.

ReturnsSignatureSummary
voidload(UI ui) staticSets every @UIProperty field of the UI from its property file; a key missing from the file leaves its field unchanged.
voidsave(UI ui) staticWrites every @UIProperty field of the UI to its property file; a null field removes its key.

void load(UI ui) static

Sets every @UIProperty field of the UI from its property file; a key missing from the file leaves its field unchanged.

void save(UI ui) static

Writes every @UIProperty field of the UI to its property file; a null field removes its key.


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