<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div>I also implemented ProcessAnnotatedType like <br><br>public class ProcessAnnotatedTypeImpl<X> impements ProcessAnnotatedType<X>{}<br><br>then firing event like this<br>ProcessAnnotatedType<X> event = new ProcessAnnotatedTypeImpl<X>();<br>or<br>ProcessAnnotatedType<?> event = new ProcessAnnotatedType();<br><br>Then in BeanManagerImpl.fireEvent(Object event, ....)<br>event.getClass.getTypeParameters always returns TypeVariables.<br><br>>>>You must create a sub class, this then allows Java to resolve the type variables<br>What do you mean by saying "allows Java to resolve the type variables"?<br><br>--Gurkan<br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font
face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Pete Muir <pmuir@redhat.com><br><b><span style="font-weight: bold;">To:</span></b> Gurkan Erdogdu <gurkanerdogdu@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> webbeans-dev@lists.jboss.org<br><b><span style="font-weight: bold;">Sent:</span></b> Wednesday, August 26, 2009 10:21:54 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [webbeans-dev] TypeVariabe Event Type<br></font><br>
Yes, you can't fire an event of type Foo<T>. You must create a sub class, this then allows Java to resolve the type variables. In the RI we do<br><br>new ProcessAnnotatedTypeImpm<T>() {};<br><br>to achieve this.<br><br>On 26 Aug 2009, at 20:15, Gurkan Erdogdu wrote:<br><br>> Hi;<br>> <br>> In method, public void fireEvent(Object event, Annotation... qualifiers) in BeanManager; spec specifies that runtime event type can not be TypeVariable. But when I look at portable events, all of them contain type variable.<br>> <br>> For Example;<br>> <br>> ProcessAnnotatedType<X><br>> <br>> When fires this event, event.getClass.getTypeVariables always contain TypeVariable.<br>> <br>> Is this true?<br>> <br>> Thanks;<br>> <br>> --Gurkan<br>> <br>> <br>> _______________________________________________<br>> webbeans-dev mailing list<br>> <a ymailto="mailto:webbeans-dev@lists.jboss.org"
href="mailto:webbeans-dev@lists.jboss.org">webbeans-dev@lists.jboss.org</a><br>> <a href="https://lists.jboss.org/mailman/listinfo/webbeans-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/webbeans-dev</a><br><br></div></div></div><br>
</body></html>