[cdi-dev] [JBoss JIRA] (CDI-562) Add the possibility to retrieve {{Bean<T>}} from one of its instance

Antoine Sabot-Durand (JIRA) issues at jboss.org
Tue Sep 15 12:06:00 EDT 2015


Antoine Sabot-Durand created CDI-562:
----------------------------------------

             Summary: Add the possibility to retrieve {{Bean<T>}} from one of its instance
                 Key: CDI-562
                 URL: https://issues.jboss.org/browse/CDI-562
             Project: CDI Specification Issues
          Issue Type: Feature Request
          Components: Beans
    Affects Versions: 2.0-EDR1, 1.2.Final
            Reporter: Antoine Sabot-Durand


Since CDI 1.1 it's possible to inject its meta data in a bean instance wit {{@Inject Bean<T> meta;}}. Its very useful to get information like actual class or qualifier on the current bean.
This feature is great when we own the code and can add the injection point but when the bean is defined in a third party lib this information are not reachable.

It would be nice to have a method in the {{BeanManager}} or elsewhere being able to return the Bean<T> corresponding to a T instance or {{null}} if the instance is not managed.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the cdi-dev mailing list