Help

Controls

Switch Workspace

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Comparing current revision with historical revision 3.
Document History: Dependency Injection Wishlist
Current revision:
6
Parent:
Weld
Created On:
20. Nov 2009, 01:23 (gavin)
Last Modified On:
31. Dec 2009, 11:45 (gavin)
Historical revisions:
5 29. Dec 2009, 23:54 (gavin) ShowDiff
4 29. Dec 2009, 22:35 (gavin) ShowDiff
3 20. Nov 2009, 15:45 (gavin) ShowDiff
2 20. Nov 2009, 01:58 (gavin) ShowDiff
1 20. Nov 2009, 01:33 (gavin) ShowDiff
0 (Initial Revision) ShowDiff

From line 0 changed to line 0:
Work in progress list of enhancements to |javax.enterprise.inject| and |javax.enterprise.context| for the CDI 1.0 maintenance release.
Work in progress list of enhancements to |javax.enterprise.inject| and |javax.enterprise.context| for the CDI 1.0 maintenance release and CDI 1.1.
From line 56 deleted to line 56:

From line 74 added to lines 73 to 90:

++ Allow injection of |Bean| object for a bean

Currently we allow injected dependent objects to inject an |InjectionPoint|. We should also allow beans to inject their own |Bean| (and |Module|?), and, in the case of dependent objects, the |Bean| of the object to which they belong (not all dependent objects are injected).

++ Support producers with a type variable bean type

The spec says that you can't have a type variable be a bean type. But we can in theory use |InjectionPoint| to overcome Java's lack of reified generics, to allow the following:

`@Produces @Parameter("")
<T> T getParameter(FacesContext fc, InjectionPoint ip) {
Class<T> type = (Class<T>) ip.getType();
String paramName = ip.getAnnotated().getAnnotation(Parameter.class).value();
//get the parameter value and convert it to the right type
...
}`

Note that we would have to think extra-hard before relaxing the complementary restriction that an injection point type may not be a type variable (since then you would need the whole stack of |InjectionPoint|s).