matteobaccan / owner

Get rid of the boilerplate code in properties based configuration.

Home Page:https://matteobaccan.github.io/owner/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possibility to get only those properties that explicitly declared in MyProperties interface

Achitheus opened this issue · comments

I read documentation and found this option:

Map<String, String> properties = new TreeMap<>();
accessible.fill(properties);
properties.forEach(
            (key, value) -> // whatever
);

where accessible is MyPropertiesInterface which extendsAccessible instead of extendingConfig directlly.
But this approach just gives all available properties from all declared @Config.Sources no matter which properties declared explicitly in the interface