ConfigJSR
ConfigJSR copied to clipboard
@ConfigProperty applicable to a TYPE or a METHOD?
The @ConfigProperty has a target like
@Target({METHOD, FIELD, PARAMETER, TYPE})
Do we currently support METHOD and TYPE? Looks like in most cases, it's for fields.
For version, I would only keep FIELD and PARAMETER that we can easily support
Happy to push a PR if we are ok.
I would say that CONSTRUCTOR and METHOD are more appropriate than TYPE as those two targets would potentially be used by those in a CDI environment.
Yes, I'm not sure myself why it's TYPE, but TYPE is really cool as it allows us to apply it to interfaces!
In Geronimo-config we used this to implement interface-style config a la Apache DeltaSpike. See https://github.com/eclipse/ConfigJSR/issues/12
We should probably rename it to something else? @Configured
for example?