title: Java reflection: how do the Method.getGenericXXXXX methods work?
body: <p>I just noticed there's a <a href="http://download.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html#getGenericReturnType%28%29" rel="nofollow"><code>Method.getGenericReturnType()</code></a> as well as <a href="http://download.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html#getReturnType%28%29" rel="nofollow"><code>Method.getReturnType()</code></a> and similar pairs for exception types and parameter types.</p>
  
  <p>I thought generics in Java worked via type erasure. So how would these methods work at runtime? (and what would I use them for at runtime?)</p>