users@hk2.java.net

Re: Assisted Injection

From: John Wells <john.wells_at_oracle.com>
Date: Tue, 24 Sep 2013 06:57:07 -0400

Yes, assisted injection is supported. Jersey uses the feature heavily.
I noticed that we don't do a gr8 job of saying the words "assisted
injection" on the extensions page, or even on the example.

Here is the page with an example assisted injection:

https://hk2.java.net/2.2.0-b17/extensibility.html#Custom_Injection_Resolvers

Here is an example:

https://hk2.java.net/2.2.0-b17/custom-resolver-example.html

The basic idea is that you can write your own custom injection resolver
for @Inject, and you can inject the existing resolver for @Inject into
that one. In this way you can assist the injection using whatever parts
of the existing resolver that you want to (or you can replace it
completely).

On 9/24/2013 12:06 AM, Aden wrote:
> Is assisted injection supported? There is a JIRA ticket for it (see
> link below) that has been closed but no mention in the documentation
> on how to use it. Any help you can provide on the matter will be
> greatly appreciated.
>
> https://java.net/jira/browse/HK2-45
>
> -Aden