[
https://issues.jboss.org/browse/CDI-320?page=com.atlassian.jira.plugin.sy...
]
Antoine Sabot-Durand commented on CDI-320:
------------------------------------------
Your quote of the spec seems a bit old.
The current spec says
{quote}
The container must fire an event, before it processes a type, for:
• every Java class, interface or enum discovered
• each Java class, interface or enum that must be delivered to a ProcessAnnotatedType
observer, where the event parameter
is annotated with @WithAnnotations.
{quote}
I think the use case of adding an annotation thru an {{AnnotatedType}} in
{{BeforeBeanDiscovery.addAnnotatedType()}} or {{AferTypeDiscovery.addAnnotatedType()}} is
very unlikely, but we could change the previous wording by
{quote}
The container must fire an event, before it processes a type, for:
• every Java class, interface or enum discovered
• *every {{AnnotatedType}} representing a Java class, interface or enum added by
{{BeforeBeanDiscovery.addAnnotatedType()}} or {{AferTypeDiscovery.addAnnotatedType()}}*
• each Java class, interface or enum that must be delivered to a ProcessAnnotatedType
observer, where the event parameter
is annotated with @WithAnnotations.
{quote}
Wdyt ?
Clarify whether ProcessAnnotatedType should be fired for annotations
--------------------------------------------------------------------
Key: CDI-320
URL:
https://issues.jboss.org/browse/CDI-320
Project: CDI Specification Issues
Issue Type: Clarification
Components: Portable Extensions
Reporter: Ron Šmeral
Labels: CDI_spec_chge, Ready_to_fix
Fix For: 1.2 Proposed
It should be stated clearly whether {{ProcessAnnotatedType}} should be fired for
annotations.
Currently, *11.5.6 ProcessAnnotatedType event* says:
{quote}
The container must fire an event, before it processes a type, for each:
* Java class, interface or enum in a bean archive,
{quote}
The word "annotation" has been introduced into the above line and later
reverted.
{quote}
* Annotated type added by {{BeforeBeanDiscovery.addAnnotatedType()}},
{quote}
The wording used here, however, doesn't exclude the option of the annotated type
being an Annotation.
--
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