[
https://issues.jboss.org/browse/CDI-455?page=com.atlassian.jira.plugin.sy...
]
Martin Kouba commented on CDI-455:
----------------------------------
I think we should add {{Event.select()}} and {{Instance.select()}} variants which also
accept {{java.lang.reflect.Type}}. The argument should be checked at runtime and
{{IllegalArgumentException}} should be thrown if the type is not a subtype of the
event/required type.
Also the trick with {{ChocolateEater}} described above would only work for simple
parameterized types and not for more complex use cases.
Allow building of TypeLiteral's with dynamic types
--------------------------------------------------
Key: CDI-455
URL:
https://issues.jboss.org/browse/CDI-455
Project: CDI Specification Issues
Issue Type: Feature Request
Reporter: Lucas Ventura Carro
Fix For: 2.1 (Discussion)
It could be useful the building of {{TypeLiteral}}'s, but using dynamic types. This
way, the types can be indicated at runtime and not in compile. This functionality is
"doable" as it is done at [
Guice|https://github.com/google/guice], a similar
injection framework, and as [this post
shows|http://luisfsgoncalves.wordpress.com/2010/09/08/generic-bindings-wi...].
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)