How does it work? - SamuelLongchamps/light-config GitHub Wiki

Annotations allow the implementor of the Configuration interface to retrieve which fields are to be persisted. Using reflection, field names are retrieved and are used as keys in a map, where the value is a decorator class ConfigVariable allows to store any object and which other parts of the software can observe for changes. The implementor provides a way to save and load the map.

It is important to note that the ConfigVariable doesn't own any data, but rather is provided a supplier which is used to update its value object reference. All modifications to the annotated objects can be reflected to the configuration variables either directly by using a special setter setAndUpdate() or by modifying the objects directly and then pushing the changes for all of them using updateAll().