[cdi-dev] [JBoss JIRA] (CDI-43) Allow Extensions to specify the annotations that they are interested in

Pete Muir (JIRA) jira-events at lists.jboss.org
Fri Aug 24 12:11:15 EDT 2012

    [ https://issues.jboss.org/browse/CDI-43?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713634#comment-12713634 ] 

Pete Muir commented on CDI-43:

First draft, only for ProcessAnnotatedType, at https://github.com/jboss/cdi/pull/88

I'm not sure this makes sense more generally. 

I think for ProcessBean and ProcessBeanAttributes, ProcessObserverMethod and ProcessInjectionPoint I would prefer to be able to use qualifiers to restrict the beans processed. 

For producers, it would probably make sense to use only annotations on the annotated member and it's parameters. For InjectionTarget's probably only type level annotations.

For observer methods, I guess event qualifiers make sense.

I would prefer to start with just ProcessAnnotatedType, and go from there. Maybe we should loosen it to non-portable to use @WithAnnotations elsewhere, making it possible for implementations to experiment.
> Allow Extensions to specify the annotations that they are interested in
> -----------------------------------------------------------------------
>                 Key: CDI-43
>                 URL: https://issues.jboss.org/browse/CDI-43
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Portable Extensions
>    Affects Versions: 1.0
>            Reporter: Stuart Douglas
>             Fix For: 1.1.PRD
> Currently portable extensions that wish to look for a specific annotation have to look through all availible classes in the ProcessAnnotatatedType event, which is quite inefficient. It would be good if extensions could do something like:
> public void processAnnotatedType(@Observes @RequireAnnotations({@Unwraps.class}) ProcessAnnotatedType pat) 
> This could allow the container to take advantage of annotation indexing to improve boot time performance, as well as reducing uneeded processing in the observer.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the cdi-dev mailing list