Skip to content

HotReload

final class HotReload
Package: dev.joid.internal · Module: core · Source: HotReload.java

Watches the class files of open UIs in dev mode and reloads a UI when its classes change.

An open UI is watched in dev mode unless its @UIDataDebug turns hotreload off. JOID watches the folder or the jar file that the classes of the UI come from, every 500 ms, and reloads the UI on the render thread one second after the last change.

ReturnsSignatureSummary
voidwatch(UI ui, Runnable reload) staticStarts watching the classes of the UI and runs reload when they change.
voidunwatch(UI ui) staticStops watching the classes of the UI; the watcher of a folder stops with its last UI.

void watch(UI ui, Runnable reload) static

Starts watching the classes of the UI and runs reload when they change. When the classes come neither from a folder nor from a jar file, it prints a warning and watches nothing. A UI calls it when it opens in dev mode.

void unwatch(UI ui) static

Stops watching the classes of the UI; the watcher of a folder stops with its last UI.


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