title: Generic method of abstract class
body: <p>I've got the following method of an <code>public abstract class Model { //impl }</code> (declared exactly like this):</p>
  
  <pre><code> protected &lt;T extends Model&gt; HashMap&lt;String, Model&gt; resultsetMap(ResultSet res) {
       HashMap&lt;String, Model&gt; data = new HashMap&lt;String, Model&gt;();
       try {
           while(res.next()) {
              Model obj = T.getNew(res);
              data.put(obj.toString(), obj);
           }
       } catch(SQLException e) {
           return null;
       }
       return data;
   }
  </code></pre>
  
  <ol>
  <li><code>T</code> is supposed to tell the caller the concrete class it should use. Is this possible?</li>
  <li>How would I call this method from another method of a subclass of <code>Model</code>? I've tried with <code>resultsetMap&lt;Course&gt;(res);</code> but it looks like a syntactic error</li>
  </ol>