Cannot perform instanceof check against parameterized type ArrayList<Foo>
<p>The following code:</p>

<pre><code>((tempVar instanceof ArrayList&lt;Foo&gt;) ? tempVar : null);
</code></pre>

<p>causes:<br>
<code>Cannot perform instanceof check against parameterized type ArrayList&lt;Foo&gt;. Use the form ArrayList&lt;?&gt; instead since further generic type information will be erased at runtime</code></p>

<p>Can someone explain me what is meant by <code>"further generic type information will be erased at runtime"</code> and how to fix this?</p>
