Skip to content

JOIDEnv

final class JOIDEnv
Package: dev.joid.lib · Module: core · Source: JOIDEnv.java

The mode JOID runs in and the folders where it writes its data and its caches.

JOID turns dev mode on by itself when the dev classes are on the classpath (the dev jar), and demo mode when the demo classes are. The folders come from the system properties joid.data and joid.cache when they are set.

ReturnsSignatureSummary
voiddevMode(boolean devMode) staticTurns dev mode on or off.
voiddataDir(File dataDir) staticSets the data folder; set it before the first UI opens.
voidcacheDir(File cacheDir) staticSets the cache folder; set it before the backend registers.
booleanisDevMode() staticIf true, the inspector, hot reload, the dev shortcuts and the dev warnings are on.
booleanisDemoMode() staticIf true, the demo classes of JOID are on the classpath.
FilegetDataDir() staticFolder where JOID writes the stores and the remembered properties: joid.data, or the joid folder of the working directory.
FilegetCacheDir() staticFolder where JOID writes the caches it can rebuild, such as generated font atlases: joid.cache, or a joid folder in the cache folder of the user on this operating system.

void devMode(boolean devMode) static

Throws:

  • IllegalStateException: The dev mode needs the dev classes of JOID, use its dev jar

Turns dev mode on or off. Throws an IllegalStateException when you turn it on without the dev classes of JOID on the classpath.

void dataDir(File dataDir) static

Sets the data folder; set it before the first UI opens.

void cacheDir(File cacheDir) static

Sets the cache folder; set it before the backend registers.

boolean isDevMode() static

If true, the inspector, hot reload, the dev shortcuts and the dev warnings are on.

boolean isDemoMode() static

If true, the demo classes of JOID are on the classpath.

File getDataDir() static

Folder where JOID writes the stores and the remembered properties: joid.data, or the joid folder of the working directory.

File getCacheDir() static

Folder where JOID writes the caches it can rebuild, such as generated font atlases: joid.cache, or a joid folder in the cache folder of the user on this operating system.


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