<br>&nbsp;&nbsp; Emily,<br><br>&nbsp;&nbsp; Yes, this is not supported since generics information is not available at runtime, and in this way, we can&#39;t constrain facts by generics information.<br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">
2007/7/6, Emily Harsh &lt;<a href="mailto:mail@wolfprint.com">mail@wolfprint.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br><br>I&#39;m using Drools 4.0M3.&nbsp; Several of the objects in our object model take advantage of generics.&nbsp; I was able to utilize generics in the consequences by setting the Java language level to 1.5 in the PackageBuilderConfiguration, however I would also like to optimize my rule activations by using the concrete types in the conditions.&nbsp; I&#39;m assuming this is not currently supported since I get the following error when I try to specify the concrete type in the condition:
<br>mismatched token: [@345,1242:1242=&#39;&lt;&#39;,&lt;78&gt;,30:15]; expecting type LEFT_PAREN[30,45]<br><br>My working rule uses the following syntax:<br>rule &quot;Test Generics&quot;<br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Span () # 
4.0: Can we use concrete type Span&lt;Integer&gt;?<br>&nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(&quot;RULE: Matched Span()&quot;);<br>end<br><br>I would like to be able to specify the concrete type like this:<br>rule &quot;Test Generics 2&quot;
<br>
&nbsp;&nbsp;&nbsp; when<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Span&lt;Integer&gt; ()<br>
&nbsp;&nbsp;&nbsp; then<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(&quot;RULE: Matched Span&lt;Integer&gt;()&quot;);<br>
end<br><br>Our object model uses the generic type &quot;Span&quot; heavily.&nbsp; I am hoping that I will be able to reduce the number of rule activations by specifying the concrete type in the condition.<br><br>Any chance this will be available in the 
4.0 general release?<br><br>Thanks!<br><span class="sg">Emily<br>
</span><br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br></blockquote></div>
<br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">
www.jboss.com</a>