[
https://issues.jboss.org/browse/CDI-43?page=com.atlassian.jira.plugin.sys...
]
Stuart Douglas commented on CDI-43:
-----------------------------------
I think that should should also apply to ProcessBean, ProcessProducer etc. In this case
the even is only delivered if the declaring class (i.e. Bean.getBeanClass() ) meets these
requirements.
Also "Note that if even one extension doesn't use this feature, the performance
benefit is lost." is not strictly true. There can still be a saving if the extension
without this annotation either:
- Does not observer ProcessAnnotatedType
- Only looks for class level annotations (AnnotatedMethod/AnnotatedField objects are very
expensive to create)
It is only if an extension does not use this annotation and also inspects every field and
method of every class that there is no performance benefit.
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 (Proposed)
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:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira