This update contains several new features:
* Support for Java records
* Support for File, Path, URL, URI, Instant
* New project structure that makes it easier to add support
for additional file types
... and some breaking changes:
* The code for saving and loading YAML files was moved from the
configlib-core to the configlib-yaml module:
* The Configurations class has been renamed to YamlConfigurations
and its methods lost their -YamlConfiguration affix.
* FieldFormatter has been renamed to NameFormatter
This annotation can be used to apply a FieldNameFormatter
to a Configuration without having to instantiate a Properties
object. The FieldNameFormatter returned by the annotation
takes precedence over the value returned by the Properties object.
Added FieldNameFormatters.UPPER_UNDERSCORE
If your configuration has a lot of fields and you want to exclude some
of these fields without making them final, static or transient, you can
configure your properties object to use additional FieldFilters.
A FieldFilter filters the fields of a configuration class by a specified
criterion. For example, if you only want to include fields whose names
don't start with 'ignore', you would add the following filter:
YamlProperties properties = YamlProperties.builder()
.addFilter(field -> !field.getName().startsWith("ignore"))
// ...
.build();