[cdi-dev] Should AnnotatedType also reflect inherited information?

Peter Muir pmuir at redhat.com
Mon May 23 17:27:36 EDT 2011


Yes, AnnotatedType is the *only* source of metadata, reflection must not be used. Arne's wording is in HEAD.

--
Pete Muir
http://in.relation.to/Bloggers/Pete

On 23 May 2011, at 22:25, Arne Limburg <arne.limburg at openknowledge.de> wrote:

> Hi,
> 
> My suggestions on this will make it clear for CDI 1.1:
> https://issues.jboss.org/browse/CDI-70
> With this clarifications the current implementation in OWB would be illegal since it introspects the superclass using reflection instead of using the AnnotatedType (which currently would not work, since the AnnotatedType does not contain this information).
> 
> The problem here is, that if the AnnotatedType does not contain information of superclass hierarchy (like currently in OWB), there is no way for Extensions to modify annotations of superclasses (i.e. add a qualifier to an @Inject-field or -method). Nothing seems to indicate that this was the intention of the CDI 1.0 spec ;-)
> 
> Kind regards,
> Arne
> 
> -----Ursprüngliche Nachricht-----
> Von: cdi-dev-bounces at lists.jboss.org [mailto:cdi-dev-bounces at lists.jboss.org] Im Auftrag von Mark Struberg
> Gesendet: Montag, 23. Mai 2011 23:13
> An: cdi-dev at lists.jboss.org
> Betreff: [cdi-dev] Should AnnotatedType also reflect inherited information?
> 
> Hi!
> 
> I think the spec is not explicit on this question: Should the AnnotatedType delivered to the Extensions as parameter or via BeanManager#getAnnostatedType() also deliver information gathered from it's superclass hierarchy?
> 
> Sounds reasonable, but is nowhere explicitely defined. Thus I better ask ;)
> 
> txs and LieGrue,
> strub
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
> 
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev



More information about the cdi-dev mailing list