[cdi-dev] [JBoss JIRA] (CDI-460) Support repeating annotations in CDI SPI
John Ament (JIRA)
issues at jboss.org
Fri Nov 11 08:58:00 EST 2016
[ https://issues.jboss.org/browse/CDI-460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Ament closed CDI-460.
--------------------------
Resolution: Done
Closing out - CDI-471 is going to encompass the repeating changes required in the spec.
> Support repeating annotations in CDI SPI
> ----------------------------------------
>
> Key: CDI-460
> URL: https://issues.jboss.org/browse/CDI-460
> Project: CDI Specification Issues
> Issue Type: Clarification
> Components: Portable Extensions
> Reporter: Antonin Stefanutti
> Fix For: 2.0 .Final
>
>
> In CDI 1.2, it is not explicitly stated whether altering the annotation-based metadata in a way to add multiple annotations of the same type is possible or not. That situation occurs with the following combinations:
> {{AnnotatedType.getAnnotations()}} and {{ProcessAnnotatedType.setAnnotatedType(AnnotatedType at)}},
> {{BeanAttributes.getQualifiers()}}, and {{ProcessBeanAttributes.setBeanAttributes(BeanAttributes ba)}},
> {{InjectionPoint.getQualifiers}} and {{ProcessInjectionPoint.setInjectionPoint(InjectionPoint ip)}}.
> Being able to decorate these metadata with repeating annotations enables powerful and elegant use cases as discussed in [OWB-1004|https://issues.apache.org/jira/browse/OWB-1004], that is the ability to use an annotation both as a CDI qualifier and a metadata provider during injection.
> Given that Java 8 provides support for [repeating annotations|http://docs.oracle.com/javase/tutorial/java/annotations/repeating.html], it seems logical to have repeating annotations supported at the CDI SPI level. Though, that's important to have that support explicitly stated and specified in CDI.
> Indeed, while Weld permits metadata alteration with repeating annotations, OpenWebBeans does not for the moment though developers understand the need and are willing to open that behavior as discussed in [OWB-1004|https://issues.apache.org/jira/browse/OWB-1004] as long as that support will be made explicit in the specification.
> That applies as well for {{EventMetadata.getQualifiers}} in _read-only_.
> While that request is technically independent from Java 8, it is correlated to the support of repeating qualifiers in the typesafe resolution mechanism that is likely to be treated as part of the Java 8 stream of the CDI 2.0 specification.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the cdi-dev
mailing list