[cdi-dev] [JBoss JIRA] (CDI-282) Vetoing types - clarify consequences

Martin Kouba (JIRA) jira-events at lists.jboss.org
Mon Jan 7 08:07:08 EST 2013


    [ https://issues.jboss.org/browse/CDI-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743765#comment-12743765 ] 

Martin Kouba commented on CDI-282:
----------------------------------

In fact I was thinking of something like this:

{code}
@Vetoed
@Target({ TYPE, METHOD, PARAMETER, FIELD })
@Retention(RUNTIME)
@Documented
@Qualifier
public @interface Predator {
}

/**
 * Predator annotation is vetoed. Does it mean the Tiger bean has Any and Default qualifiers only?
 */
@Predator
public class Tiger {
}
{code}
                
> Vetoing types - clarify consequences
> ------------------------------------
>
>                 Key: CDI-282
>                 URL: https://issues.jboss.org/browse/CDI-282
>             Project: CDI Specification Issues
>          Issue Type: Clarification
>            Reporter: Martin Kouba
>            Assignee: Pete Muir
>            Priority: Critical
>             Fix For: 1.1.PFD
>
>
> The spec currently says {{@Vetoed}} type is *prevented from being considered by CDI* and {{ProcessAnnotatedType.veto()}} forces the container to ignore the type. This is quite obvious for classes and interfaces. However not so clear when vetoing annotations (e.g. qualifier). I think ignoring means not being considered as qualifier (thus affects resolution). Other (rather theoretical) example is vetoing non-contextual instances - should it prevent performing dependency injection?

--
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


More information about the cdi-dev mailing list