Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
6.3
-
None
Description
Right now we already support injecting the result of a Factory by using the @Provider annotation (equivalent of the @Instance annotation in CDI, which extends @Provider from javax.inject). For example:
@Inject @Named("context") private Provider<ComponentManager> cmProvider;
Here the idea is to be able to simply write:
@Inject @Named("context") private ComponentManager cm;
And if some class exists and has a special annotation (like @Producer) or some method annotated with @Produces (as it's in CDI, see https://docs.jboss.org/weld/reference/1.0.0/en-US/html/producermethods.html) then the result of that method is automatically injected.