Class ApplicationSettings

java.lang.Object
io.activej.common.ApplicationSettings

public final class ApplicationSettings extends Object
A class for initializing runtime constants

Each application setting provides a name of a class, a name of a setting, and a default value to be used in case a setting is not explicitly set

A setting is searched by using both fully qualified class name and a class's simple name

By default, system properties are searched to find whether a setting is explicitly set. However, alternative properties may be used as a source. Individual settings may also be set programmatically.

After any setting has been looked up it is not allowed to change properties source or update individual settings. Hence, all configuration should preferably happen in a static initialization block before constants have been initialized.