title: Eclipse autocompletion - how does it know about generics when only binary jar is available?
body: <p>Java generics are implemented using type erasure. That means that if I have a method:</p>
  
  <pre><code>public void setMapParam(Map&lt;String, Integer&gt; p) { ... }
  </code></pre>
  
  <p>after compilation, it will end up in the .class as:</p>
  
  <pre><code>public void setMapParam(Map p) { ... }
  </code></pre>
  
  <p>I have a JAR file with generic classes and methods like the above. It is just the binary. No source code no nothing. </p>
  
  <p>But when I use it in code, Eclipse auto completion gives me <code>setMapParam(Map&lt;String, Integer&gt; p)</code> even though in the binary is like <code>setMapParam(Map p)</code>.</p>
  
  <p>How does Eclipse now the type (<code>Map&lt;String, Integer&gt;</code>) even if the method signature has been type erased (to <code>Map</code>)? Or am I missing something?</p>