add support for named attribute injection #30
find attached a small contribution that adds support for named attribute injection.
It allows to inject directly default system properties which key use a dot naming (ex: user.home) and thus cannot be used as an attribute name in a Java class.
I found it usefull for example to write things like:
…ct directly default system properties which key uses dot.
no thanks. I'm just thinking about using all good contributions in afterburner. I would like to afterburner as lean as only possible. So far I didn't had any requirements for @nAmed injection. In fact using @nAmed for injection is considered in CDI as a "bad practice".
I'm just waiting, whether other afterburner users miss the Named injection as well.
thanks for your great contribution!,
I understand your concerns to keep Afterburner lean.
On the other hand, using this annotation was a simple way to inject those non compatible (with java field names) system properties or also program arguments.
Another way to do it could be also to use again some other convention (replacement of char in attribute name?):
Not sure it is cleaner.
I agree, but Afterburner is javax.inject compliant, not CDI compliant. We cannot use as it is today a qualifier let say as: @SystemProperty("line.separator").