Because the Config interface has a nice way to convert values and handle optional values, it would be nice if the API allowed to extract a subset of a Config to pass it as a parameter to methods that don't care about the external structure:
Eg.
app.foo.username=guest
app.foo.password=guest
SmallRyeConfig config = ...
Config subset = config.subset("app.foo");
// Now I can call methods taking the config as a parameter that only cares about the leaf nodes:
configure(subset);
public void configure(Config subset) {
String username = subset.getValue("username",String.class); // This would return "guest"
}
Because the
Configinterface has a nice way to convert values and handle optional values, it would be nice if the API allowed to extract a subset of aConfigto pass it as a parameter to methods that don't care about the external structure:Eg.