[JBoss JIRA] (CDI-716) Allow to recognize custom Bean at runtime

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[JBoss JIRA] (CDI-716) Allow to recognize custom Bean at runtime

JIRA issues@jboss.org

     [ https://issues.jboss.org/browse/CDI-716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antoine Sabot-Durand updated CDI-716:
-------------------------------------
    Fix Version/s: 2.1 (Discussion)


> Allow to recognize custom Bean at runtime
> -----------------------------------------
>
>                 Key: CDI-716
>                 URL: https://issues.jboss.org/browse/CDI-716
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Beans
>    Affects Versions: 2.0 .Final
>            Reporter: Matej Novotny
>             Fix For: 2.1 (Discussion)
>
>
> At the moment, they only way to tell custom bean (created via {{BeanConfigurator}} or class implementing {{javax.enterprise.inject.spi.Bean}}) from "standard" one is to have an extension and listen to {{ProcessSyntheticBean}}. This is good enough if it's sufficient to tell the difference at bootstrap time.
> However, at runtime, there is no way to do this.
> We could add a method to {{javax.enterprise.inject.spi.Bean}} which would allow to tell the difference. The name of the method could be {{isCustom()}} or {{getKind()}}.
> Generally, there should be no need to differentiate between custom/standard beans, but when digging deeper, it doesn't hurt to know. Putting this into {{Bean}} interface keeps it deep enough while still giving the information.
> One of the use cases for this would be CDI-194, which could be "nicely" implemented (avoiding {{null}} values), if there was a way to recognize custom bean.



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
_______________________________________________
cdi-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/cdi-dev

Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.