Thanks for the prompt response!<div><br></div><div>Best regards,</div><div>Martin<br><br><div class="gmail_quote">2011/10/17 Geoffrey De Smet <span dir="ltr">&lt;<a href="mailto:ge0ffrey.spam@gmail.com">ge0ffrey.spam@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><u></u>

  
    
  
  <div text="#000000" bgcolor="#ffffff">
    Java&#39;s generics are implemented by erasure,<br>
    which implies that there no information available at runtime that a
    instance of a List is of a certain generic type, for example Boost.<br>
    So I don&#39;t think this is possible.<br>
    <br>
    Note that some things do work in erasure IIRC, like the generic type
    of a defined field in a class is available at runtime:<br>
    public class Foo {<br>
      private List&lt;Bar&gt; list;<br>
    }<br>
    but that&#39;s not useful in this case :)<br>
    <br>
    Op 17-10-11 11:30, Martin A schreef:
    <blockquote type="cite"><div><div></div><div class="h5">Hello,
      <div><br>
      </div>
      <div>In my rules file I&#39;d like to set something like this:</div>
      <div><br>
      </div>
      <div>
        <div>rule &quot;mayThrowDice&quot;</div>
        <div>    when</div>
        <div>        $user : User($gp : gameplay)</div>
        <div>        $gameplay(this == $gp)</div>
        <div>    then</div>
        <div>        exists List&lt;Boost&gt;() {</div>
        <div>            ..... some business logic</div>
        <div>        }</div>
        <div>end</div>
      </div>
      <div><br>
      </div>
      <div>But it looks like there is no generics support. How can I
        make sure there is a List of type Boost inserted into the
        session?</div>
      <div><br>
      </div>
      <div>Thank you,</div>
      <div>Martin</div>
      </div></div><pre><fieldset></fieldset>
_______________________________________________
rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
    </blockquote><font color="#888888">
    <br>
    <pre cols="72">-- 
With kind regards,
Geoffrey De Smet</pre>
  </font></div>

<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a 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></div>