[cdi-dev] [JBoss JIRA] (CDI-697) Provide delegating/forwarding implementations of the annotated type model classes

Laird Nelson (JIRA) issues at jboss.org
Mon Mar 20 16:40:00 EDT 2017

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

Laird Nelson commented on CDI-697:

Yes.  The current Javadocs actually seem to say explicitly that the behavior outlined here is not what happens.  See the [documentation for the {{fields()}} method|http://docs.jboss.org/cdi/api/2.0-PRD/javax/enterprise/inject/spi/configurator/AnnotatedTypeConfigurator.html#fields--], which refers to the [documentation for the {{AnnotatedType#getFields()}} method|http://docs.jboss.org/cdi/api/2.0-PRD/javax/enterprise/inject/spi/AnnotatedType.html#getFields--].  Taken together, this basically states that {{fields()}} returns "the fields of the type", which is not true—it returns the "fields of the type" as well as those of every other type in the type hierarchy.

> Provide delegating/forwarding implementations of the annotated type model classes
> ---------------------------------------------------------------------------------
>                 Key: CDI-697
>                 URL: https://issues.jboss.org/browse/CDI-697
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Portable Extensions
>            Reporter: Laird Nelson
>            Priority: Minor
> A lot of duplicate efforts could be eliminated if the CDI SPI supplied delegating implementations of each of the {{Annotated*}} SPI interfaces.  These implementations would assist in creating objects suitable for passing to {{ProcessAnnotatedType#setAnnotatedType(AnnotatedType)}} (and the like) when the configurator APIs prove to be too simplistic.

This message was sent by Atlassian JIRA

More information about the cdi-dev mailing list