[webbeans-dev] event type with type variable

Gavin King gavin.king at gmail.com
Wed Aug 5 17:46:28 EDT 2009


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



More information about the weld-dev mailing list