[
https://issues.jboss.org/browse/CDI-43?page=com.atlassian.jira.plugin.sys...
]
Jozef Hartinger commented on CDI-43:
------------------------------------
I wonder if this could be implemented as a qualifier taking advantage of CDI-234 outcome.
The container would then appear to be firing PAT with @WithAnnotations() qualifier that
would contain every annotation found on the type and the observer method would be
filtering PAT events using the qualifier. Of course, this would still allow container to
optimize and do not actually fire all the events nor enumerate all the annotations of the
type. However, from the extension developer perspective using existing concept -
qualifiers - would be more natural than introducing a special annotation.
However, this would require CDI-234 resolved with support for non-standard array
comparison where the required and provided qualifier would be distinguished - array
comparison would be asymmetric (e.g. a value of a array member value of a required
qualifier is a subset of the value of the matching member of the event qualifier)
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
Assignee: Pete Muir
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({(a)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
For more information on JIRA, see:
http://www.atlassian.com/software/jira