[cdi-dev] [JBoss JIRA] (CDI-471) Support repeating qualifiers in typesafe resolution mechanism

Antonin Stefanutti (JIRA) issues at jboss.org
Mon Sep 15 04:57:02 EDT 2014

Antonin Stefanutti created CDI-471:

             Summary: Support repeating qualifiers in typesafe resolution mechanism
                 Key: CDI-471
                 URL: https://issues.jboss.org/browse/CDI-471
             Project: CDI Specification Issues
          Issue Type: Feature Request
          Components: Resolution
            Reporter: Antonin Stefanutti

As Java 8 provides improved support for [repeating annotations|http://docs.oracle.com/javase/tutorial/java/annotations/repeating.html], it would be valuable to percolate that support into the CDI typesafe resolution mechanism.

For example, one could write:

public interface @ContextName {
    String value;

public @interface ContextNames {
    ContextName[] value();

And then:

class CamelContext1 {

class CamelContext2 {

static ProducerTemplate producerTemplate(InjectionPoint ip, @Any Instance<CamelContext> instance) {

That enables to use annotations both as a CDI qualifiers and a metadata providers while still be relying on standard typesafe resolution mechanism during the deployment phase to detect unsatisfied or ambiguous dependencies.

Support of the annotation container / list for backward compatibility could be provided as well.

This message was sent by Atlassian JIRA

More information about the cdi-dev mailing list