[webbeans-dev] event type with type variable

Gavin King gavin.king at gmail.com
Wed Aug 5 17:49:48 EDT 2009


I guess I should elaborate. Event object types may not contain type
variables. Event parameter types may. If you think about nothing else
but this problem for about three days without stopping to eat or
drink, it will become incredibly clear why this is the only thing that
could possibly be correct. :-)

On Wed, Aug 5, 2009 at 5:46 PM, Gavin King<gavin.king at gmail.com> wrote:
> On Fri, Jul 24, 2009 at 12:46 PM, Pete Muir<pmuir at redhat.com> wrote:
>
>> This isn't legal
>>
>> public class Foo{
>>
>> @Produces <T> Bar make(@Any Event<T> event) {
>> ...
>>
>> }
>
>
> Actually that *is* legal. Except for the @Produces annotation (not
> sure what that's doing there).
>
> Section 10.4.1 says:
>
> "The event parameter type may contain a type variable or wildcard."
>
>
>
> --
> Gavin King
> gavin.king at gmail.com
> http://in.relation.to/Bloggers/Gavin
> http://hibernate.org
> http://seamframework.org
>



-- 
Gavin King
gavin.king at gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org



More information about the weld-dev mailing list