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

Peter Muir pmuir at redhat.com
Mon May 23 17:48:06 EDT 2011


I think it's ok now

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

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

> Maybe we should explicitly state that AnnotatedType contains superclass information. Currently it's implicit because of my wording and the fact, that Annotations on superclasses are processed (i.e. @Inject on superclasses works).
> 
> Regards,
> Arne
> 
> -----Ursprüngliche Nachricht-----
> Von: Peter Muir [mailto:pmuir at redhat.com] 
> Gesendet: Montag, 23. Mai 2011 23:28
> An: Arne Limburg
> Cc: Mark Struberg; cdi-dev at lists.jboss.org
> Betreff: Re: [cdi-dev] Should AnnotatedType also reflect inherited information?
> 
> 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