Arbitrary parameterized type as a config property?
I'm not quite sure whether this should be supported or not.
Suppose that we have a parameterized type: Foo<T>. Now I'd like to use Foo as a config property (using implicit converters), e.g.:
@Inject
@ConfigProperty(name="myFoo")
Foo<String>
I think this wouldn't work ATM because ConfigExtension does not register a custom bean for an injetion point that has a parameterized required type: https://github.com/smallrye/smallrye-config/blob/master/implementation/src/main/java/io/smallrye/config/inject/ConfigExtension.java#L68
But it's probably a corner case...
This could be done by allowing converter classes to be loaded with a parameter. For example it would be interesting to allow:
public class MyConverter<T> implements Converter<Foo<T>> {
public MyConverter(Converter<T> nestedConverter) {
...
}
}
or even:
public class MyConverter<T, U> implements Converter<Foo<T, U>> {
public MyConverter(Converter<T> nestedConverter1, Converter<U> nestedConverter2) {
...
}
}
Of course this adds some complexity in type resolution.