[
https://issues.jboss.org/browse/CDI-515?page=com.atlassian.jira.plugin.sy...
]
Martin Kouba commented on CDI-515:
----------------------------------
That would be way more complicated if possible at all. Let's assume you have two
producers for dependent {{Foo}} and each specifies a different qualifer. Then you inject
{{Instance<Foo>}} and select Instance for qualifier {{@A}} and get instance of Foo,
and select Instance for qualifier {{@B}} and get instance of Foo. How would you
differentiate these instances? What happens if you pass Foo {{@B}} reference to the
Instance for Foo {{@A}}? You would have to track all the instances provied by each
Instance.
Allow to obtain Bean metadata from javax.enterprise.inject.Instance
-------------------------------------------------------------------
Key: CDI-515
URL:
https://issues.jboss.org/browse/CDI-515
Project: CDI Specification Issues
Issue Type: Feature Request
Affects Versions: 1.2.Final
Reporter: Martin Kouba
Assignee: Martin Kouba
Fix For: 2.0 (proposed)
Sometimes it might be useful to obtain Bean metadata from the
{{javax.enterprise.inject.Instance}} (similarly as 5.5.8. Bean metadata). The method could
be named {{getBean()}} and should have similar restrictions like {{get()}} (e.g. throw
{{UnsatisfiedResolutionException}} if appropriate).
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)