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.
Description
Section titled “Description”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.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
void | watch(UI ui, Runnable reload) static | Starts watching the classes of the UI and runs reload when they change. |
void | unwatch(UI ui) static | Stops watching the classes of the UI; the watcher of a folder stops with its last UI. |
Method details
Section titled “Method details”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.
unwatch
Section titled “unwatch”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
